aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2016-05-03 19:14:31 +0300
committerEli Zaretskii2016-05-03 19:14:31 +0300
commit79e58003aa91ea1273f2588c3891a6ad9c5d282e (patch)
tree37d7a02af8b8795d5b5247127f2f079260c19f01
parent2ea2a2f1a5b5b2e1b20f1ee8c86058334d0a2652 (diff)
downloademacs-79e58003aa91ea1273f2588c3891a6ad9c5d282e.tar.gz
emacs-79e58003aa91ea1273f2588c3891a6ad9c5d282e.zip
Improve documentation of Dired's 'A' and 'Q' commands
* lisp/dired-aux.el (dired-do-find-regexp) (dired-do-find-regexp-and-replace): Mention 'grep-find-ignored-files' and 'vc-directory-exclusion-list', and also the fact that REGEXP should be palatable by Grep. (Bug#23426) * lisp/dired.el: Update the corresponding autoload forms. * doc/emacs/dired.texi (Operating on Files): Mention 'grep-find-ignored-files' and 'vc-directory-exclusion-list'. (Bug#23429)
-rw-r--r--doc/emacs/dired.texi14
-rw-r--r--lisp/dired-aux.el13
-rw-r--r--lisp/dired.el11
3 files changed, 35 insertions, 3 deletions
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index 089b1091618..aa717dfad54 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -795,6 +795,14 @@ This command is a variant of @code{xref-find-references}
795where you can navigate between matches and display them as needed 795where you can navigate between matches and display them as needed
796using the commands described in @ref{Xref Commands}. 796using the commands described in @ref{Xref Commands}.
797 797
798@vindex grep-find-ignored-files @r{(Dired)}
799@vindex vc-directory-exclusion-list @r{(Dired)}
800If any of the marked files are directories, then this command searches
801all of the files in those directories, and any of their
802subdirectories, recursively, except files whose names match
803@code{grep-find-ignored-files} and subdirectories whose names match
804@code{vc-directory-exclusion-list}.
805
798@kindex Q @r{(Dired)} 806@kindex Q @r{(Dired)}
799@findex dired-do-find-regexp-and-replace 807@findex dired-do-find-regexp-and-replace
800@cindex search and replace in multiple files (in Dired) 808@cindex search and replace in multiple files (in Dired)
@@ -809,6 +817,12 @@ and you can use the special commands in that buffer (@pxref{Xref
809Commands}). In particular, if you exit the query replace loop, you 817Commands}). In particular, if you exit the query replace loop, you
810can use @kbd{r} in that buffer to replace more matches. 818can use @kbd{r} in that buffer to replace more matches.
811@xref{Identifier Search}. 819@xref{Identifier Search}.
820
821Like with @code{dired-do-find-regexp}, if any of the marked files are
822directories, this command performs replacements in all of the files in
823those directories, and in any of their subdirectories, recursively,
824except for files whose names match @code{grep-find-ignored-files} and
825subdirectories whose names match @code{vc-directory-exclusion-list}.
812@end table 826@end table
813 827
814@node Shell Commands in Dired 828@node Shell Commands in Dired
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index cef4a96b763..5ee3c118cb1 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -2720,7 +2720,12 @@ with the command \\[tags-loop-continue]."
2720;;;###autoload 2720;;;###autoload
2721(defun dired-do-find-regexp (regexp) 2721(defun dired-do-find-regexp (regexp)
2722 "Find all matches for REGEXP in all marked files. 2722 "Find all matches for REGEXP in all marked files.
2723For any marked directory, all of its files are searched recursively." 2723For any marked directory, all of its files are searched recursively.
2724However, files matching `grep-find-ignored-files' and subdirectories
2725matching `vc-directory-exclusion-list' are skipped in the marked
2726directories.
2727
2728REGEXP should use constructs supported by your local `grep' command."
2724 (interactive "sSearch marked files (regexp): ") 2729 (interactive "sSearch marked files (regexp): ")
2725 (require 'grep) 2730 (require 'grep)
2726 (defvar grep-find-ignored-files) 2731 (defvar grep-find-ignored-files)
@@ -2743,7 +2748,11 @@ For any marked directory, all of its files are searched recursively."
2743(defun dired-do-find-regexp-and-replace (from to) 2748(defun dired-do-find-regexp-and-replace (from to)
2744 "Replace matches of FROM with TO, in all marked files. 2749 "Replace matches of FROM with TO, in all marked files.
2745For any marked directory, matches in all of its files are replaced, 2750For any marked directory, matches in all of its files are replaced,
2746recursively." 2751recursively. However, files matching `grep-find-ignored-files'
2752and subdirectories matching `vc-directory-exclusion-list' are skipped
2753in the marked directories.
2754
2755REGEXP should use constructs supported by your local `grep' command."
2747 (interactive 2756 (interactive
2748 (let ((common 2757 (let ((common
2749 (query-replace-read-args 2758 (query-replace-read-args
diff --git a/lisp/dired.el b/lisp/dired.el
index 41525a45595..2cc3c88dbc0 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4425,13 +4425,22 @@ with the command \\[tags-loop-continue].
4425(autoload 'dired-do-find-regexp "dired-aux" "\ 4425(autoload 'dired-do-find-regexp "dired-aux" "\
4426Find all matches for REGEXP in all marked files. 4426Find all matches for REGEXP in all marked files.
4427For any marked directory, all of its files are searched recursively. 4427For any marked directory, all of its files are searched recursively.
4428However, files matching `grep-find-ignored-files' and subdirectories
4429matching `vc-directory-exclusion-list' are skipped in the marked
4430directories.
4431
4432REGEXP should use constructs supported by your local `grep' command.
4428 4433
4429\(fn REGEXP)" t nil) 4434\(fn REGEXP)" t nil)
4430 4435
4431(autoload 'dired-do-find-regexp-and-replace "dired-aux" "\ 4436(autoload 'dired-do-find-regexp-and-replace "dired-aux" "\
4432Replace matches of FROM with TO, in all marked files. 4437Replace matches of FROM with TO, in all marked files.
4433For any marked directory, matches in all of its files are replaced, 4438For any marked directory, matches in all of its files are replaced,
4434recursively. 4439recursively. However, files matching `grep-find-ignored-files'
4440and subdirectories matching `vc-directory-exclusion-list' are skipped
4441in the marked directories.
4442
4443REGEXP should use constructs supported by your local `grep' command.
4435 4444
4436\(fn FROM TO)" t nil) 4445\(fn FROM TO)" t nil)
4437 4446