GNU bug report logs - #34949
27.0.50; Docstring of `vc-deduce-fileset' incomplete

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Fri, 22 Mar 2019 18:04:02 UTC

Severity: minor

Tags: confirmed, fixed

Found in version 27.0.50

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>,  34949 <at> debbugs.gnu.org
Subject: Re: bug#34949: 27.0.50; Docstring of `vc-deduce-fileset' incomplete
Date: Sun, 29 Mar 2020 01:54:22 +0200
>>> * r             vc-dir-mark-registered
>>> * u             vc-dir-mark-unregistered
>>> ...
>> This is implemented as well:
>
> Here's a somewhat more subtle option for your consideration:
>
> Personally, I'm likely to never use vc-dir-mark-unregistered because I tend
> to leave unregistered files around (ones that should really be in
> gitignore, but it's a pain to add them). And adding unregistered files
> one-by-one is not too much trouble, it's a relatively rare operation (or
> you can always use 'M'). So I would leave that command unbound.

Indeed, marking unregistered files should not be a frequent operation.

> Marking "registered" files, though, could be made more streamlined. Right
> now I have to navigate to files in all different statuses present in the
> current repo and press 'M' for each status.
>
> However! vc-dir-mark-all-files has a special behavior when it's called with
> C-u: it tries to mark all files in the current VC-Dir buffer.

Or equivalent behavior is when typing 'M' at the top of VC-Dir buffer.

> Which is pretty useless when we also have files in incompatible
> statuses because vc-next-action fails with that fileset.
>
> So what we could do, is have vc-dir-mark-all-files call
> vc-dir-mark-registered in that case instead. This way the former command
> becomes significantly more useful, and the latter one doesn't really need
> a separate key binding. And I'm sure 'C-u M' would become quite handy.

I don't see a need to rely on vc-dir-mark-registered then.
vc-dir-mark-all-files could work in two passes: first to check
if there are some unregistered files, then on the second pass
ignore unregistered files and mark only registered files.
In any case the logic becomes more complicated.

Actually on second thought: no way since vc-dir-mark-all-files
can't guess user's intention: whether the user wants
to mark all registered files to commit them, or the user
wants to mark all unregistered files to register them.
So maybe better to leave vc-dir-mark-all-files alone?




This bug report was last modified 5 years and 38 days ago.

Previous Next


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