GNU bug report logs - #64531
[PATCH] Add new command vc-dir-copy-filename-as-kill

Previous Next

Package: emacs;

Reported by: Ivan Sokolov <ivan-p-sokolov <at> ya.ru>

Date: Sat, 8 Jul 2023 07:53:02 UTC

Severity: wishlist

Tags: patch

Full log


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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 64531 <at> debbugs.gnu.org, Ivan Sokolov <ivan-p-sokolov <at> ya.ru>,
 dgutov <at> yandex.ru
Subject: Re: bug#64531: [PATCH v3] Add new commands for copying VC filenames
Date: Wed, 12 Feb 2025 00:37:04 -0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Ivan Sokolov <ivan-p-sokolov <at> ya.ru>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>, Dmitry Gutov <dgutov <at> yandex.ru>
>> 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.




This bug report was last modified 123 days ago.

Previous Next


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