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

From: Dmitry Gutov <[email-masked]>
Date: Mon, 16 Mar 2020 22:17:38 +0200

On 16.03.2020 1:58, Juri Linkov wrote:
>> The hook will allow us to move almost all of the new code to the place
>> where its purpose is more obvious. And that's a good thing.
> 
> I think better to leave marking in vc-dir.el because it's the file
> that deals with details of marking vc-dir files (using ewoc, etc.)
> 
> Requiring ewoc in vc.el would be inappropriate (supposing that the
> hook will reside in vc.el)

Here's a slight modification: create both the hook and a function inside 
the vc-dir package (let's call it vc-dir-mark-files) which will accept a 
list of file names and mark them. dired-vc-next-action will then call it 
from the hook.

This way, ewoc juggling will not spill outside.

>>> Maybe then a shorter name vc-root-dir-action?
>>
>> The word "action" there seems to hold no particular meaning.
>>
>> vc-root-dir-with-dwim-selection, maybe?
> 
> Shorter names:
> 
> vc-dir-root-registered
> or just
> vc-dir-registered

These either sound like callbacks, or alternatively make an impression 
that only registered files will be *shown* (not marked).

Are you sure you don't want to split it into a new command that will 
simply mark a set of files you expect here? E.g. all belonging to 
"registered" statuses. That might require extra keypress, but 
vc-dir-root-registered is probably not going to have the same short 
combination that vc-dir has anyway. So it might be a wash, keypresses-wise.

And vc-dir-root can just be "vc-dir in the repository root" that we both 
have wanted for a while.

> Also there is a command 'vc-register' (C-x v i).
> Its counterpart could be named 'vc-dir-register'
> and will open a vc-dir buffer where only unregistered
> files will be marked.

Are you sure you will remember the new commands and use them on a 
regular basis? I most likely won't.

And similarly, we can add a special command to mark only unregistered 
files. Although it's usually not a problem to navigate to the first 
unregistered one and press 'M'.