Use grep-find-ignored-directories instead of vc-directory-exclusion-list
* lisp/dired-aux.el (dired-do-find-regexp): Use grep-find-ignored-directories instead of vc-directory-exclusion-list. The result should be functionally similar (the former uses the latter as the default value), but it should be more consistent and appropriate WRT user customizations. (dired-do-find-regexp-and-replace): Update the docstring. * lisp/dired.el: Update the corresponding autoloads. * doc/emacs/dired.texi (Operating on Files): Update the documentation accordingly.
This commit is contained in:
parent
6f82d8ef7d
commit
6428aa044a
3 changed files with 10 additions and 9 deletions
|
@ -796,12 +796,12 @@ 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)}
|
||||
@vindex grep-find-ignored-directories @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}.
|
||||
@code{grep-find-ignored-directories}.
|
||||
|
||||
@kindex Q @r{(Dired)}
|
||||
@findex dired-do-find-regexp-and-replace
|
||||
|
@ -822,7 +822,7 @@ 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}.
|
||||
subdirectories whose names match @code{grep-find-ignored-directories}.
|
||||
@end table
|
||||
|
||||
@node Shell Commands in Dired
|
||||
|
|
|
@ -2722,17 +2722,18 @@ with the command \\[tags-loop-continue]."
|
|||
"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
|
||||
matching `grep-find-ignored-directories' 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)
|
||||
(defvar grep-find-ignored-directories)
|
||||
(let* ((files (dired-get-marked-files))
|
||||
(ignores (nconc (mapcar
|
||||
(lambda (s) (concat s "/"))
|
||||
vc-directory-exclusion-list)
|
||||
grep-find-ignored-directories)
|
||||
grep-find-ignored-files))
|
||||
(xrefs (cl-mapcan
|
||||
(lambda (file)
|
||||
|
@ -2749,7 +2750,7 @@ REGEXP should use constructs supported by your local `grep' command."
|
|||
"Replace matches of FROM with TO, in all marked files.
|
||||
For any marked directory, matches in all of its files are replaced,
|
||||
recursively. However, files matching `grep-find-ignored-files'
|
||||
and subdirectories matching `vc-directory-exclusion-list' are skipped
|
||||
and subdirectories matching `grep-find-ignored-directories' are skipped
|
||||
in the marked directories.
|
||||
|
||||
REGEXP should use constructs supported by your local `grep' command."
|
||||
|
|
|
@ -3919,7 +3919,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
|
|||
|
||||
;;; Start of automatically extracted autoloads.
|
||||
|
||||
;;;### (autoloads nil "dired-aux" "dired-aux.el" "00fe45cfae47cace47cffc09afca6832")
|
||||
;;;### (autoloads nil "dired-aux" "dired-aux.el" "8346506b9ef7167fd55b5eac7e6617a1")
|
||||
;;; Generated autoloads from dired-aux.el
|
||||
|
||||
(autoload 'dired-diff "dired-aux" "\
|
||||
|
@ -4426,7 +4426,7 @@ with the command \\[tags-loop-continue].
|
|||
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
|
||||
matching `grep-find-ignored-directories' are skipped in the marked
|
||||
directories.
|
||||
|
||||
REGEXP should use constructs supported by your local `grep' command.
|
||||
|
@ -4437,7 +4437,7 @@ REGEXP should use constructs supported by your local `grep' command.
|
|||
Replace matches of FROM with TO, in all marked files.
|
||||
For any marked directory, matches in all of its files are replaced,
|
||||
recursively. However, files matching `grep-find-ignored-files'
|
||||
and subdirectories matching `vc-directory-exclusion-list' are skipped
|
||||
and subdirectories matching `grep-find-ignored-directories' are skipped
|
||||
in the marked directories.
|
||||
|
||||
REGEXP should use constructs supported by your local `grep' command.
|
||||
|
|
Loading…
Add table
Reference in a new issue