[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:17:03 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
On 30.05.2020 15:42, Kévin Le Gouguec wrote:
(Though I've just noticed that project-current now returns transient
projects unconditionally when project--find-in-directory returns nil;
BTW, that's a bug. :-(
since I'm not interested in showing transient projects in the frame
title, I might just go with project-try-vc like Dmitry suggested…)
Not really what I was suggesting.
Here's another patch you can try, it should cover both problems:
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 1f2a4e8471..2d0b6c4a21 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -115,10 +115,11 @@ project-current
maybe-prompt)
(setq dir (project-prompt-project-dir)
pr (project--find-in-directory dir))))
- (if pr
- (project--add-to-project-list-front pr)
- (project--remove-from-project-list dir)
- (setq pr (cons 'transient dir)))
+ (when maybe-prompt
+ (if pr
+ (project--add-to-project-list-front pr)
+ (project--remove-from-project-list dir)
+ (setq pr (cons 'transient dir))))
pr))
(defun project--find-in-directory (dir)
- Re: New feature in project.el: Remembering the previously used projects, (continued)
Re: New feature in project.el: Remembering the previously used projects, Kévin Le Gouguec, 2020/05/29