Closed Dickby closed 7 years ago
Hi @Dickby, thanks for the bug report, will try looking into this tonight.
Unfortunately there is not much I can do about, the new Emacs process that is spawned inherits the whatever is the currently default-directory
from the old Emacs session. So projectile still reports it is in the same project.
Do you have any suggestions about what the default directory should be for new Emacs session? I can think about it.
I'm using Linux where, after a regular startup the home directory is the default directory first, so for Linux this would be my suggestion "~/". I'm not really familiar with the "standard" default directory on other OS.
Actually that is not always true, if you start Emacs from a shell it would inherit whatever directory you were in when you started Emacs, let me see if it is possible to get that.
This is why I used the term "regular startup", but if it's possible to get the last startups default-directory, thats better of course.
It turns out we can reliably detect the startup directory on Linux on other platforms we fallback to some heuristics. Can you test the latest master (it should be available on MELPA within next few hours) and report back if it works for you.
Works fine so far. restart-emacs
restarts in the directory i started emacs the first time
Thanks.
Thanks for the quick test, closing this.
after restarting emacs with
restart-emacs
projectile stays inside the project that was open before restarting. `(projectile-project-p) still shows that project. This can be a little bit anoying in some cases. Thanks