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: Juri Linkov
Subject: bug#67171: 30.0.50; (At least) some VC commands fail with project-prefix-or-any-command
Date: Fri, 08 Dec 2023 09:40:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>>>>> +      (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?

Probably by a command symbol property, although I don't quite like such 
solution.





reply via email to

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