bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34949: 27.0.50; Docstring of `vc-deduce-fileset' incomplete


From: Dmitry Gutov
Subject: bug#34949: 27.0.50; Docstring of `vc-deduce-fileset' incomplete
Date: Sun, 29 Mar 2020 21:41:47 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 29.03.2020 01:54, Juri Linkov wrote:

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.

Not exactly: here it only marks the files in the same state as the first file in the 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.

Um, no. This way you can't avoid marking the unregistered files when there are some in the repo. Which, as we seem to agree, is an infrequent operation, which can be done by other means: either by marking them all one-by-one, or just navigating to the first one and pressing 'M' after that.

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?

I really think we should optimize for the most frequent operation there. Otherwise, 'C-u M' remains fairly useless (but still takes up a key sequence). The fact that it can mark a set of files in incompatible statuses, and nobody has filed a bug report about that until now, likely indicates that people don't often use it. Or don't use it at all.

So I suggest we make that change on master and then see whether anyone decides to complain.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]