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 #65 received at 67171 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 67171 <at> debbugs.gnu.org, sbaugh <at> catern.com, juri <at> linkov.net
Subject: Re: bug#67171: 30.0.50; (At least) some VC commands fail with
 project-prefix-or-any-command
Date: Thu, 07 Dec 2023 11:23:35 +0000
Hello,

On Thu 07 Dec 2023 at 02:10am +02, Dmitry Gutov wrote:

> On 06/12/2023 17:09, Sean Whitton wrote:
>
>>> Combined with
>>>
>>>    (put 'vc-print-root-log 'project-switch-with-default-directory t)
>>>
>>> somewhere in your init script.
>>>
>>> The alternative would be tagging all project-related commands. Even if we also
>>> check for the 'project-' prefix in command's name, the user-defined commands
>>> using the project API will be affected (I don't know for how many it would be
>>> a problem, but still).
>> This solution makes sense.  We definitely want the user to have a way to
>> tag additional commands.  But couldn't we pre-tag some, like this one,
>> for example?  It is difficult to think of wanting to not have this one
>> tagged.  And the user could always remove the tag in their init.
>
> That would be a half-measure still. And why this command but not others? And
> if others too, then which ones?
>
> It might seem natural to you, but it never occurred to add vc-print-root-log
> to project-prefix-map to me. What other commands would not occur to us both
> but would to others?
>
> Would it make sense to tag all VC commands? Or just consider the 'vc-' prefix
> as a negative?
>
> To consider the "alternative" approach once more, we could recognize the
> 'project-' commands as the ones that should use
> project-current-directory-override. But the rest would use default-directory,
> unless they have a property 'project-related' or something. That would exclude
> user-defined commands in the beginning, but then again, the difference between
> binding project-current-directory-override and default-directory might matter
> only to a small fraction of them.

I think the half-measure is okay, for it can become a fuller measure
over time.  Let's not do anything blanket for all vc- or project-
commands, but just provide the facility, and pre-tag commands as we
realise it couldn't make sense not to want the facility for those.

-- 
Sean Whitton




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.