GNU bug report logs -
#67171
30.0.50; (At least) some VC commands fail with project-prefix-or-any-command
Previous Next
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
View this message in rfc822 format
>>> + (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'?
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.