* bug#60887: 29.0.60; Same keys for vc-dir-mark-by-regexp and dired-mark-files-regexp
@ 2023-01-17 17:15 Juri Linkov
2023-01-18 13:03 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2023-01-17 17:15 UTC (permalink / raw)
To: 60887
[-- Attachment #1: Type: text/plain, Size: 441 bytes --]
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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vc-dir-mark-by-regexp.patch --]
[-- Type: text/x-diff, Size: 2207 bytes --]
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.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#60887: 29.0.60; Same keys for vc-dir-mark-by-regexp and dired-mark-files-regexp
2023-01-17 17:15 bug#60887: 29.0.60; Same keys for vc-dir-mark-by-regexp and dired-mark-files-regexp Juri Linkov
@ 2023-01-18 13:03 ` Eli Zaretskii
2023-01-18 17:56 ` Juri Linkov
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2023-01-18 13:03 UTC (permalink / raw)
To: Juri Linkov; +Cc: 60887
> From: Juri Linkov <juri@linkov.net>
> Date: Tue, 17 Jan 2023 19:15:27 +0200
>
> 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:
Thanks, this is okay for the emacs-29 branch.
> +@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.
^^^^^
"states", I guess?
And why isn't there a NEWS entry about the second change you make
here?
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#60887: 29.0.60; Same keys for vc-dir-mark-by-regexp and dired-mark-files-regexp
2023-01-18 13:03 ` Eli Zaretskii
@ 2023-01-18 17:56 ` Juri Linkov
0 siblings, 0 replies; 3+ messages in thread
From: Juri Linkov @ 2023-01-18 17:56 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 60887
close 60887 29.0.60
quit
>> *** 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:
>
> Thanks, this is okay for the emacs-29 branch.
Pushed.
>> +@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.
> ^^^^^
> "states", I guess?
>
> And why isn't there a NEWS entry about the second change you make
> here?
Fixed as well.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-18 17:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 17:15 bug#60887: 29.0.60; Same keys for vc-dir-mark-by-regexp and dired-mark-files-regexp Juri Linkov
2023-01-18 13:03 ` Eli Zaretskii
2023-01-18 17:56 ` Juri Linkov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.