mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-02 11:21:42 +00:00
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)
This commit is contained in:
parent
2ea2a2f1a5
commit
79e58003aa
@ -795,6 +795,14 @@ This command is a variant of @code{xref-find-references}
|
||||
where you can navigate between matches and display them as needed
|
||||
using the commands described in @ref{Xref Commands}.
|
||||
|
||||
@vindex grep-find-ignored-files @r{(Dired)}
|
||||
@vindex vc-directory-exclusion-list @r{(Dired)}
|
||||
If any of the marked files are directories, then this command searches
|
||||
all of the files in those directories, and any of their
|
||||
subdirectories, recursively, except files whose names match
|
||||
@code{grep-find-ignored-files} and subdirectories whose names match
|
||||
@code{vc-directory-exclusion-list}.
|
||||
|
||||
@kindex Q @r{(Dired)}
|
||||
@findex dired-do-find-regexp-and-replace
|
||||
@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
|
||||
Commands}). In particular, if you exit the query replace loop, you
|
||||
can use @kbd{r} in that buffer to replace more matches.
|
||||
@xref{Identifier Search}.
|
||||
|
||||
Like with @code{dired-do-find-regexp}, if any of the marked files are
|
||||
directories, this command performs replacements in all of the files in
|
||||
those directories, and in any of their subdirectories, recursively,
|
||||
except for files whose names match @code{grep-find-ignored-files} and
|
||||
subdirectories whose names match @code{vc-directory-exclusion-list}.
|
||||
@end table
|
||||
|
||||
@node Shell Commands in Dired
|
||||
|
@ -2720,7 +2720,12 @@ with the command \\[tags-loop-continue]."
|
||||
;;;###autoload
|
||||
(defun dired-do-find-regexp (regexp)
|
||||
"Find all matches for REGEXP in all marked files.
|
||||
For any marked directory, all of its files are searched recursively."
|
||||
For any marked directory, all of its files are searched recursively.
|
||||
However, files matching `grep-find-ignored-files' and subdirectories
|
||||
matching `vc-directory-exclusion-list' are skipped in the marked
|
||||
directories.
|
||||
|
||||
REGEXP should use constructs supported by your local `grep' command."
|
||||
(interactive "sSearch marked files (regexp): ")
|
||||
(require 'grep)
|
||||
(defvar grep-find-ignored-files)
|
||||
@ -2743,7 +2748,11 @@ For any marked directory, all of its files are searched recursively."
|
||||
(defun dired-do-find-regexp-and-replace (from to)
|
||||
"Replace matches of FROM with TO, in all marked files.
|
||||
For any marked directory, matches in all of its files are replaced,
|
||||
recursively."
|
||||
recursively. However, files matching `grep-find-ignored-files'
|
||||
and subdirectories matching `vc-directory-exclusion-list' are skipped
|
||||
in the marked directories.
|
||||
|
||||
REGEXP should use constructs supported by your local `grep' command."
|
||||
(interactive
|
||||
(let ((common
|
||||
(query-replace-read-args
|
||||
|
@ -4425,13 +4425,22 @@ with the command \\[tags-loop-continue].
|
||||
(autoload 'dired-do-find-regexp "dired-aux" "\
|
||||
Find all matches for REGEXP in all marked files.
|
||||
For any marked directory, all of its files are searched recursively.
|
||||
However, files matching `grep-find-ignored-files' and subdirectories
|
||||
matching `vc-directory-exclusion-list' are skipped in the marked
|
||||
directories.
|
||||
|
||||
REGEXP should use constructs supported by your local `grep' command.
|
||||
|
||||
\(fn REGEXP)" t nil)
|
||||
|
||||
(autoload 'dired-do-find-regexp-and-replace "dired-aux" "\
|
||||
Replace matches of FROM with TO, in all marked files.
|
||||
For any marked directory, matches in all of its files are replaced,
|
||||
recursively.
|
||||
recursively. However, files matching `grep-find-ignored-files'
|
||||
and subdirectories matching `vc-directory-exclusion-list' are skipped
|
||||
in the marked directories.
|
||||
|
||||
REGEXP should use constructs supported by your local `grep' command.
|
||||
|
||||
\(fn FROM TO)" t nil)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user