[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10624: 24.0.92; default value of `dired-do-ch*'
From: |
Juri Linkov |
Subject: |
bug#10624: 24.0.92; default value of `dired-do-ch*' |
Date: |
Sun, 16 Sep 2012 01:54:23 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) |
> Dired-marking all files in the region
This is a feature that's sorely missing from Dired.
Currently marking a long list of files by pressing `m'
and holding it as long as the cursor eventually arrives
to the last file is too tedious (and the numeric prefix
doesn't help when the exact number of files to mark is not known).
Now with the following patch it's possible to mark a list of files
with normal region selection (and using isearch to speed it up)
and type `m' (or `u' to unmark) just once.
=== modified file 'lisp/dired.el'
--- lisp/dired.el 2012-09-14 03:55:16 +0000
+++ lisp/dired.el 2012-09-15 22:54:12 +0000
@@ -3102,12 +3120,15 @@ (defun dired-mark (arg)
and \\[dired-unmark] on a subdir to remove the marks in
this subdir."
(interactive "P")
+ (if (and transient-mark-mode mark-active)
+ ;; Mark files in the active region.
+ (dired-mark-files-in-region (region-beginning) (region-end))
(if (dired-get-subdir)
(save-excursion (dired-mark-subdir-files))
(let ((inhibit-read-only t))
(dired-repeat-over-lines
(prefix-numeric-value arg)
- (function (lambda () (delete-char 1) (insert dired-marker-char)))))))
+ (function (lambda () (delete-char 1) (insert dired-marker-char))))))))
(defun dired-unmark (arg)
"Unmark the current (or next ARG) files.