You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
projectile-project-buffer-p indicates whether a buffer is part of the current project. On Windows, it can sometimes (or always?) return a false negative due to path capitalization. This happens because it uses case-sensitive string-prefix-p to check whether the project root is a prefix of the full path to the currently visited file. As a result, functions like helm-projectile and projectile-switch-to-buffer will not let the user switch to a buffer of the same project.
Expected behavior
projectile-project-buffer-p always returns t when a buffer is part of a project.
The last step will return nil when it should be t (this buffer is surely part of the project). This happens because in projectile-project-buffer-p, project-root will evaluate to c:/Home/repo/demo.txt, while (file-truename default-directory) will be c:/home/repo/demo.txt.
Environment & Version information
Projectile version information
Projectile version: 20160526.832
Emacs version
GNU Emacs 24.5.1 (x86_64-w64-mingw32)
Operating system
Windows 7
The text was updated successfully, but these errors were encountered:
cshtarkov
added a commit
to cshtarkov/projectile
that referenced
this issue
May 30, 2016
projectile-project-buffer-p
indicates whether a buffer is part of the current project. On Windows, it can sometimes (or always?) return a false negative due to path capitalization. This happens because it uses case-sensitivestring-prefix-p
to check whether the project root is a prefix of the full path to the currently visited file. As a result, functions likehelm-projectile
andprojectile-switch-to-buffer
will not let the user switch to a buffer of the same project.Expected behavior
projectile-project-buffer-p
always returnst
when a buffer is part of a project.Actual behavior
It returns
nil
on Windows.Steps to reproduce the problem
C:\Home
.C:\Home\repo
.M-: (projectile-project-buffer-p (current-buffer) (projectile-project-root)
The last step will return
nil
when it should bet
(this buffer is surely part of the project). This happens because inprojectile-project-buffer-p
,project-root
will evaluate toc:/Home/repo/demo.txt
, while(file-truename default-directory)
will bec:/home/repo/demo.txt
.Environment & Version information
Projectile version information
Projectile version: 20160526.832
Emacs version
GNU Emacs 24.5.1 (x86_64-w64-mingw32)
Operating system
Windows 7
The text was updated successfully, but these errors were encountered: