[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New feature in project.el: Remembering the previously used projects
From: |
Dmitry Gutov |
Subject: |
Re: New feature in project.el: Remembering the previously used projects |
Date: |
Sat, 30 May 2020 16:21:43 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
On 30.05.2020 09:05, Simen Heggestøyl wrote:
The patch below mostly does that, except it misses the case when a
directory was selected from project-switch-project. [...]
Hm, I think it misses all cases when project-switch-project is used,
since project-current will find the project using
project--find-in-directory (project-switch-project already did the
prompting part).
Yes, I mentioned that downside. See another patch I just posted.
Maybe a simple solution could be to only write to the file when the
addition caused the project list to change? I think it's a good change
regardless, but is it enough to fix your issue, Kévin?
Seems like a good idea either way.
Dmitry Gutov <dgutov@yandex.ru> writes:
Alternatively, we could defer writing the file until Emacs is being
closed (and do that in kill-emacs-hook).
Maybe. I think doing it more eagerly has some advantages though if we
can make it work:
- Launching a new Emacs session while another one is running will use
the latest project list.
- If there's any problem writing to the file I imagine it's better to be
notified about it up front rather than at the time Emacs is killed.
If that's your preference, let's go with it.
Note that the above downsides are common for other features that use
kill-emacs-hook, so we're probably used to them. And I wouldn't say that
the project list is really critical to avoid losing. So I'm fine with
either.
- Re: New feature in project.el: Remembering the previously used projects, (continued)
- Re: New feature in project.el: Remembering the previously used projects, Philip K., 2020/05/29
- Re: New feature in project.el: Remembering the previously used projects, Dmitry Gutov, 2020/05/29
- Re: New feature in project.el: Remembering the previously used projects, Simen Heggestøyl, 2020/05/29
- Re: New feature in project.el: Remembering the previously used projects, Philip K., 2020/05/30
- Re: New feature in project.el: Remembering the previously used projects, Dmitry Gutov, 2020/05/30
Re: New feature in project.el: Remembering the previously used projects, Kévin Le Gouguec, 2020/05/29
- Re: New feature in project.el: Remembering the previously used projects, Dmitry Gutov, 2020/05/29
- Message not available
- Re: New feature in project.el: Remembering the previously used projects, Kévin Le Gouguec, 2020/05/30
- Re: New feature in project.el: Remembering the previously used projects, Dmitry Gutov, 2020/05/30
- Re: New feature in project.el: Remembering the previously used projects, Dmitry Gutov, 2020/05/30
- Re: New feature in project.el: Remembering the previously used projects, Kévin Le Gouguec, 2020/05/30