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

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

bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix


From: Dmitry Gutov
Subject: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command
Date: Thu, 7 Dec 2023 19:34:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 07/12/2023 19:22, Juri Linkov wrote:
+      (unless (get command 'project-switch-with-default-directory)
+        (map-keymap
+         (lambda (_evt cmd) (if (eq cmd command) (setq found t)))
+         project-prefix-map))
         (if found
             (let ((project-current-directory-override root))
               (call-interactively command))
Why not let-bind both variables for all commands:
'project-current-directory-override' and 'default-directory'?
Then project commands will pick up the first:
    (or project-current-directory-override default-directory)
And non-project commands will just ignore
'project-current-directory-override'.
I think that would still regress bug#58784.

And project-current-directory-override was really only added to benefit
such rare cases.
So the only reason to distinguish project commands from non-project commands
is that 'project-buffers' uses (buffer-local-value 'default-directory buf)?
Then wouldn't it be easier to exclude from setting default-directory
all commands that use 'project-buffers'?

Using which method, though?





reply via email to

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