From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#60887: 29.0.60; Same keys for vc-dir-mark-by-regexp and dired-mark-files-regexp Date: Tue, 17 Jan 2023 19:15:27 +0200 Organization: LINKOV.NET Message-ID: <86sfg98qi5.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38967"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) To: 60887@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 17 18:35:12 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 1pHprc-0009vO-9V for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Jan 2023 18:35:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHprV-0005lL-O9; Tue, 17 Jan 2023 12:35:05 -0500 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 1pHprT-0005j2-MB for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2023 12:35:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHprT-0008Gi-A5 for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2023 12:35:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pHprT-0002Z2-3V for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2023 12:35:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Jan 2023 17:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60887 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16739768679766 (code B ref -1); Tue, 17 Jan 2023 17:35:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Jan 2023 17:34:27 +0000 Original-Received: from localhost ([127.0.0.1]:38149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHpqt-0002XR-1R for submit@debbugs.gnu.org; Tue, 17 Jan 2023 12:34:27 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:40454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHpqq-0002XB-AC for submit@debbugs.gnu.org; Tue, 17 Jan 2023 12:34:24 -0500 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 1pHpqq-0005aB-4p for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2023 12:34:24 -0500 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHpqo-0008Cf-7y for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2023 12:34:23 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 03248C0003 for ; Tue, 17 Jan 2023 17:34:17 +0000 (UTC) Received-SPF: pass client-ip=217.70.183.198; envelope-from=juri@linkov.net; helo=relay6-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:253568 Archived-At: --=-=-= Content-Type: text/plain etc/NEWS: +++ *** New command '%' ('vc-dir-mark-by-regexp'). This command marks files based on a regexp. If given a prefix argument, unmark instead. This will cause problems when in the next versions users will request more Dired keys in Vc-Dir. For marking a regexp, Dired uses two keymaps: % m dired-mark-files-regexp * % dired-mark-files-regexp This patch uses the same keys for compatibility between Dired and Vc-Dir: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=vc-dir-mark-by-regexp.patch diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 8c77ded55d3..6cb4309c21b 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1331,11 +1331,17 @@ VC Directory Commands listed files and directories. @findex vc-dir-mark-by-regexp -@item % +@item % m You can use this command to mark files by regexp (@code{vc-dir-mark-by-regexp}). If given a prefix, unmark files instead. +@findex vc-dir-mark-registered-files +@item * r +You can use this command to mark files that are in one of registered +state, including edited, added or removed. +(@code{vc-dir-mark-registered-files}). + @item G Add the file under point to the list of files that the VC should ignore (@code{vc-dir-ignore}). For instance, if the VC is Git, it diff --git a/etc/NEWS b/etc/NEWS index ac338da71e8..435a84e7f81 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2077,7 +2077,7 @@ The VC Directory buffer now uses the prefix 'b' for these branch-related commands. +++ -*** New command '%' ('vc-dir-mark-by-regexp'). +*** New command '% m' ('vc-dir-mark-by-regexp'). This command marks files based on a regexp. If given a prefix argument, unmark instead. diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 312556f644a..749539b9518 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -325,7 +325,6 @@ vc-dir-mode-map (define-key map "U" #'vc-dir-unmark-all-files) (define-key map "\C-?" #'vc-dir-unmark-file-up) (define-key map "\M-\C-?" #'vc-dir-unmark-all-files) - (define-key map "%" #'vc-dir-mark-by-regexp) ;; Movement. (define-key map "n" #'vc-dir-next-line) (define-key map " " #'vc-dir-next-line) @@ -361,8 +360,13 @@ vc-dir-mode-map (define-key branch-map "l" #'vc-print-branch-log) (define-key branch-map "s" #'vc-switch-branch)) + (let ((regexp-map (make-sparse-keymap))) + (define-key map "%" regexp-map) + (define-key regexp-map "m" #'vc-dir-mark-by-regexp)) + (let ((mark-map (make-sparse-keymap))) (define-key map "*" mark-map) + (define-key mark-map "%" #'vc-dir-mark-by-regexp) (define-key mark-map "r" #'vc-dir-mark-registered-files)) ;; Hook up the menu. --=-=-=--