GNU bug report logs - #79126
vc-switch-working-tree does not work if there is no matching file

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dmitry <at> gutov.dev>

Date: Wed, 30 Jul 2025 02:38:01 UTC

Severity: normal

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

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: sbaugh <at> janestreet.com, 79126 <at> debbugs.gnu.org
Subject: bug#79126: vc-switch-working-tree does not work if there is no matching file
Date: Tue, 5 Aug 2025 15:30:21 +0300
On 05/08/2025 13:45, Sean Whitton wrote:
>>> The last resort fallback could possibly be to call project-switch-project?
>> Probably not - it would show the prompt a second time, right?
> No, I mean calling project-switch-project non-interactively and passing
> it the root directory.  Then the user would get some options of exactly
> what to do.

Adhering to project-switch-commands might be a fine idea, indeed. 
Although I'd probably prefer to just use Dired, myself.

>> And the last step in the algorithm from the previous paragraph would visit the
>> worktree root, I think, so there shouldn't be a scenario of a complete
>> failure.
> True, but maybe failing all the way up to the root should be a special
> case.

Semantically, just going by the command's name, it seems to me that 
switching to a different directory is the key part of its behavior, and 
finding a corresponding file - a secondary one.

Perhaps we'll want to add a command called 'vc-worktree-find-matching-file'?




This bug report was last modified 5 days ago.

Previous Next


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