Open M-Taan opened 1 year ago
It works correctly just for .emacs.d
After some tinkering, it seems that it doesn't work on projects that use mercurial, but works just fine for git projects. I'll update the issue accordingly.
I haven't used Mercurial in ages - it's possible that our project detection there is broken. Should be an easy thing to fix.
In fact, not just Mercurial projects aren't being detected, but neither are Fossil. And using an empty .projectile file also does not work.
@zilti I'll try to find some time to reproduce this, but the logic for project detection hasn't been change in a while. This definitely makes me wonder what has happened. You can try setting a breakpoint in projectile-project-root
(or rather one of the root detection functions it calls) and see what happens there.
I've tested this with .projectile
project just now and it works fine for me.
I also cloned a Mercurial project now and it works fine:
So, I can't reproduce any of the problems outline here.
Are you using the latest version of Projectile? Perhaps you can post your config here?
At any rate - it'd be good to do the debugging exercise I suggested earlier.
Hey @bbatsov, I'll give it a try in my free time and try what you suggested earlier.
My Projectile version is 2.6.0-snapshot, the one that comes with Doom Emacs. It seems Doom manipulates the variables for project detection. Weirdly though .projectile
does not work there even though they left it in... Anyway I will open an issue over @doomemacs.
I forgot to mention that the debugging instructions are here https://docs.projectile.mx/projectile/troubleshooting.html#debugging-projectile-commands
Hey, adding .projectile
did indeed work with Mercurial projects
Hi @zilti, I am seeing something similar in Doom Emacs: https://discourse.doomemacs.org/t/projectile-does-not-seem-to-consider-non-git-repos/4611/2
Did you ever open an issue? I realize this was almost 2 years ago but trying not to duplicate things.
Expected behavior
Going into a mercurial project and calling
projectile-add-to-known-project
Then when trying to switch to the newly added project usingprojectile-switch-project
It should show the files inside that project.Actual behavior
It's showing me files inside my home directory instead
Steps to reproduce the problem
projectile-add-to-known-project
to a mercurial project Then trying to go into that project usingprojectile-switch-project
Mercurial Version
version 6.2.3
Projectile version information
Projectile: 20221004.1327
Emacs version
Emacs 28.2
Operating system
Running Arch Linux: 5.19.13-arch1-1