diff options
| author | Eli Zaretskii | 2016-05-03 19:14:31 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-05-03 19:14:31 +0300 |
| commit | 79e58003aa91ea1273f2588c3891a6ad9c5d282e (patch) | |
| tree | 37d7a02af8b8795d5b5247127f2f079260c19f01 | |
| parent | 2ea2a2f1a5b5b2e1b20f1ee8c86058334d0a2652 (diff) | |
| download | emacs-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.texi | 14 | ||||
| -rw-r--r-- | lisp/dired-aux.el | 13 | ||||
| -rw-r--r-- | lisp/dired.el | 11 |
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} | |||
| 795 | where you can navigate between matches and display them as needed | 795 | where you can navigate between matches and display them as needed |
| 796 | using the commands described in @ref{Xref Commands}. | 796 | using 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)} | ||
| 800 | If any of the marked files are directories, then this command searches | ||
| 801 | all of the files in those directories, and any of their | ||
| 802 | subdirectories, 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 | |||
| 809 | Commands}). In particular, if you exit the query replace loop, you | 817 | Commands}). In particular, if you exit the query replace loop, you |
| 810 | can use @kbd{r} in that buffer to replace more matches. | 818 | can use @kbd{r} in that buffer to replace more matches. |
| 811 | @xref{Identifier Search}. | 819 | @xref{Identifier Search}. |
| 820 | |||
| 821 | Like with @code{dired-do-find-regexp}, if any of the marked files are | ||
| 822 | directories, this command performs replacements in all of the files in | ||
| 823 | those directories, and in any of their subdirectories, recursively, | ||
| 824 | except for files whose names match @code{grep-find-ignored-files} and | ||
| 825 | subdirectories 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. |
| 2723 | For any marked directory, all of its files are searched recursively." | 2723 | For any marked directory, all of its files are searched recursively. |
| 2724 | However, files matching `grep-find-ignored-files' and subdirectories | ||
| 2725 | matching `vc-directory-exclusion-list' are skipped in the marked | ||
| 2726 | directories. | ||
| 2727 | |||
| 2728 | REGEXP 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. |
| 2745 | For any marked directory, matches in all of its files are replaced, | 2750 | For any marked directory, matches in all of its files are replaced, |
| 2746 | recursively." | 2751 | recursively. However, files matching `grep-find-ignored-files' |
| 2752 | and subdirectories matching `vc-directory-exclusion-list' are skipped | ||
| 2753 | in the marked directories. | ||
| 2754 | |||
| 2755 | REGEXP 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" "\ |
| 4426 | Find all matches for REGEXP in all marked files. | 4426 | Find all matches for REGEXP in all marked files. |
| 4427 | For any marked directory, all of its files are searched recursively. | 4427 | For any marked directory, all of its files are searched recursively. |
| 4428 | However, files matching `grep-find-ignored-files' and subdirectories | ||
| 4429 | matching `vc-directory-exclusion-list' are skipped in the marked | ||
| 4430 | directories. | ||
| 4431 | |||
| 4432 | REGEXP 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" "\ |
| 4432 | Replace matches of FROM with TO, in all marked files. | 4437 | Replace matches of FROM with TO, in all marked files. |
| 4433 | For any marked directory, matches in all of its files are replaced, | 4438 | For any marked directory, matches in all of its files are replaced, |
| 4434 | recursively. | 4439 | recursively. However, files matching `grep-find-ignored-files' |
| 4440 | and subdirectories matching `vc-directory-exclusion-list' are skipped | ||
| 4441 | in the marked directories. | ||
| 4442 | |||
| 4443 | REGEXP 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 | ||