bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66317: Project mode-line


From: Dmitry Gutov
Subject: bug#66317: Project mode-line
Date: Thu, 5 Oct 2023 23:16:04 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 05/10/2023 23:03, Spencer Baugh wrote:
then while I'm at the find-file prompt, all modelines for all buffers
show emacs-29 as the current project, no matter what they showed before
(even if they didn't show anything before)

Haven't thought at all about how to fix this, but we might want to think
about it in the context of bug#63648 where we've been rethinking the
implementation of project-switch-project.

This can be fixed with e.g. patch below.

Thank for the reminder about that report, BTW.

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 2e6ae89a443..867e4754622 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1990,8 +1990,11 @@ project-switch-project
   (let ((command (if (symbolp project-switch-commands)
                      project-switch-commands
                    (project--switch-project-command))))
-    (let ((project-current-directory-override dir))
-      (call-interactively command))))
+    (unwind-protect
+        (progn
+          (setq-local project-current-directory-override dir)
+          (call-interactively command))
+      (kill-local-variable 'project-current-directory-override))))

 ;;;###autoload
 (defun project-uniquify-dirname-transform (dirname)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]