Comments (4)
I think this is because the projectile-ensure-project
, if project is active, returns a directory after calling file-truename
. If the project is prompted no such operation takes place. With this change it works correctly:
diff --git c/projectile.el w/projectile.el
index d422632..1c6a7f1 100644
--- c/projectile.el
+++ w/projectile.el
@@ -1350,8 +1350,8 @@ See also `projectile-acquire-root'."
(if dir
dir
(cond
- ((eq projectile-require-project-root 'prompt) (projectile-completing-read
- "Switch to project: " projectile-known-projects))
+ ((eq projectile-require-project-root 'prompt) (file-truename (projectile-completing-read
+ "Switch to project: " projectile-known-projects)))
(projectile-require-project-root (error "Projectile cannot find a project definition in %s" default-directory))
(t default-directory))))
from projectile.
Hmm, I'm slightly puzzled by this, as I'm not sure why the true name would matter would matter here, as the paths in projectile-known-projects
are absolute as well. Can you share more details about the project that's causing this issue for you?
from projectile.
It's every project that's in home directory (or subdirectory). projectile-known-projects
keeps projects with ~/
prefix, but inside projectile-recentf-files
there's a call to expand-file-name
which changes ~/
to /home/user
which then fails the comparison with string-prefix-p
.
You can evaluate projectile-acquire-root
inside any project and it should return expanded (with /home/user
) path but if you do that inside non-project buffer (like scratch) and pick any project when prompted, it will return a path with ~/
. This small difference is what causes the projectile-recentf
to return empty file list when called outside of any project.
from projectile.
I see what you mean. It seems to me it'd be best to add an expand-file-name
to the usage of the project-root
in projectile-recentf
. PR welcome!
from projectile.
Related Issues (20)
- Adding a .projectile file causes "projectile-invalidate-cache: Wrong type argument: hash-table-p, nil" HOT 2
- Add ability to ignore all projects matching a path HOT 1
- File /Volumes/code/master/GTAGS is not a valid tags table
- Root for gradle Java projects is wrong
- Error (use-package): projectile/:init: Recursive ‘require’ for feature ‘project’
- Weird escape characters appearing in projectile index HOT 3
- Update command cache when editing the .dir-locals.el file HOT 4
- Symlinked .gitignore files spawn "Too many levels of symbolic links" errors
- projectile-find-file-dwim: Ignore `#include`
- Add support for per-task compilation buffers within a project
- Loading projectile.el breaks magit/lsp in emacs 27.1
- Projectile can't recognise custom project type HOT 3
- Can't open file because projectile-index-directory stops when encountering directory where it has no permissions
- Projectile appends to the file path "Agent pid <some number>" HOT 1
- How do I include some external files outside the project's root?
- question: howto avoid slow nfs mount acceses
- (wrong-type-argument stringp nil) when running projectile in a newly created project
- projectile discovers projects in home as absolute paths
- Error when trying to open a ansi-term inside project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from projectile.