Subject: bug#64531: [PATCH v3] Add new commands for copying VC filenames

From: Stefan Kangas <[email-masked]>
Date: Wed, 12 Feb 2025 00:37:04 -0800

Eli Zaretskii <[email-masked]> writes:

>> From: Ivan Sokolov <[email-masked]>
>> Cc: Eli Zaretskii <[email-masked]>, Dmitry Gutov <[email-masked]>
>> Date: Mon, 04 Sep 2023 23:08:02 +0300
>>
>> I tried to write documentation for the previous version of the command
>> and came to the conclusion that I crammed too much functionality into
>> it.  So I divided the DWIM command into command for copying name at
>> point (bound to w) and command for copying marked files (bound to * w).
>>
>> I also added new command for copying VC related filenames from
>> everywhere.  An appropriate binding would be C-x v w, but I am not sure
>> if I should use a top-level binding for such an insignificant command.
>>
>> Quoting and prefix arguments now copy `dired-copy-filename-as-kill'.
>
> Thanks, a few minor comments about the documentation parts:
>
>> diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
>> index 2dad70d3d13..8e7e2365f0a 100644
>> --- a/doc/emacs/maintaining.texi
>> +++ b/doc/emacs/maintaining.texi
>> @@ -1388,6 +1388,13 @@ You can use this command to mark files that are in one of registered
>>  states, including edited, added or removed.
>>  (@code{vc-dir-mark-registered-files}).
>>
>> +@findex vc-dir-copy-marked-files-as-kill
>> +@item * w
>> +This command copy names of marked files into the kill ring.  If prefix
>                 ^^^^
> "copies"
>
>> +argument is 0 names are absolute, with other prefix arguments names
>> +are relative to the VC root directory.  Without prefix names are
>> +relative to the VC buffer directory.
>
> Our style is to describe the "normal" case first.  Like this:
>
>   Normally, the copied file names are relative to the current buffer's
>   default directory, but you can control that with the prefix
>   argument.  With prefix argument of zero, the file names are copied
>   in their absolute form; with any other value of prefix argument, the
>   file names are relative to the root directory of the VCS repository.
>
>> +@item w
>> +Copy the name of the file at point into the kill ring.  If prefix
>> +argument is 0 name is absolute, with other prefix arguments name is
>> +relative to the VC root directory.  Without prefix name is relative to
>> +the VC buffer directory.
>
> This basically repeats the same text as above.  We usually first
> describe the command in short, preferably in one sentence, and place
> the detailed description further down.  Please try to follow these
> conventions.

Ivan, could you please send an updated patch based on Eli's comments
above?  Thanks in advance.