From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64531: [PATCH v3] Add new commands for copying VC filenames Date: Tue, 05 Sep 2023 14:01:56 +0300 Message-ID: <83o7ig51ej.fsf@gnu.org> References: <87a5u1em71.fsf@ya.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23590"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64531@debbugs.gnu.org, dgutov@yandex.ru To: Ivan Sokolov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 05 13:03:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qdTpx-0005on-Ee for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Sep 2023 13:03:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdTpo-0007FV-9s; Tue, 05 Sep 2023 07:03:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdTpm-0007EI-7z for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 07:03:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdTpl-0000Xu-Q5 for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 07:03:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdTpm-0008L1-67 for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 07:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Sep 2023 11:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64531-submit@debbugs.gnu.org id=B64531.169391175132006 (code B ref 64531); Tue, 05 Sep 2023 11:03:02 +0000 Original-Received: (at 64531) by debbugs.gnu.org; 5 Sep 2023 11:02:31 +0000 Original-Received: from localhost ([127.0.0.1]:54297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdTpH-0008K9-2R for submit@debbugs.gnu.org; Tue, 05 Sep 2023 07:02:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdTpE-0008Jv-Fp for 64531@debbugs.gnu.org; Tue, 05 Sep 2023 07:02:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdTp3-0000Ij-6i; Tue, 05 Sep 2023 07:02:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Ixr+Yvd78vOWz5XrtymT7ieHR0XzK1zIYw6MxcK+GYw=; b=oaPFvQ3+qd/+ mPNkLihq/tIzbtRSvg2UdS3b6RmiTVuOGlkcIoPUtFM7tc/u1Q0Zsq8EnG53uaeeI5/BQMrTCWrqk d1jdj7gU9xpG2sPZROE/ThE4rc4c2f8Ydk4/NSNHUoyzM91ZWVYTITKuS4V8kXwdfxrE2QkPA0EUZ 77JeN2oU+Tv9kHcsPdb4iPmoEYdwD1Mui3JFllLiWF9SEZuW/vsRHBRfDnU+wjKySKFCzLg17KnMz pnwN6CEEDshEVJGtZOBRblfeeogKzkVEXsq6ReavST75LqtEJ2pf4R2J+GuNrbIlmNpTtjq3dPyGK clo84nLHe5NA+3iX8fGfHg==; In-Reply-To: <87a5u1em71.fsf@ya.ru> (message from Ivan Sokolov on Mon, 04 Sep 2023 23:08:02 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269340 Archived-At: > From: Ivan Sokolov > Cc: Eli Zaretskii , Dmitry Gutov > 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.