GNU bug report logs - #67171
30.0.50; (At least) some VC commands fail with project-prefix-or-any-command

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Tue, 14 Nov 2023 13:14:01 UTC

Severity: normal

Found in version 30.0.50

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

Full log


Message #74 received at 67171 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 67171 <at> debbugs.gnu.org, sbaugh <at> catern.com,
 Sean Whitton <spwhitton <at> spwhitton.name>
Subject: Re: 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
>>>>> +      (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.




This bug report was last modified 1 year and 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.