iqbalansari / restart-emacs

A simple emacs package to restart emacs from within emacs
GNU General Public License v3.0
154 stars 14 forks source link

problem with projectile #8

Closed Dickby closed 7 years ago

Dickby commented 7 years ago

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

iqbalansari commented 7 years ago

Hi @Dickby, thanks for the bug report, will try looking into this tonight.

iqbalansari commented 7 years ago

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.

Dickby commented 7 years ago

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.

iqbalansari commented 7 years ago

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.

Dickby commented 7 years ago

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.

iqbalansari commented 7 years ago

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.

Dickby commented 7 years ago

Works fine so far. restart-emacs restarts in the directory i started emacs the first time Thanks.

iqbalansari commented 7 years ago

Thanks for the quick test, closing this.