aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2016-04-20 17:52:25 +0300
committerEli Zaretskii2016-04-20 17:52:25 +0300
commitaa03257cb341691562101fcae8a6d6d54d420a99 (patch)
tree115ed14a6e282cc04b31c3b064922ac3c7e67a62
parentce0d8c7f2d8187942a8b45c3a71c22c5f30fa37d (diff)
downloademacs-aa03257cb341691562101fcae8a6d6d54d420a99.tar.gz
emacs-aa03257cb341691562101fcae8a6d6d54d420a99.zip
Clarify documentation of 'dired-mark-files-containing-regexp'
* doc/emacs/dired.texi (Marks vs Flags): Clarify that for files visited in buffers, 'dired-mark-files-containing-regexp' searches the buffer rather than the file on disk. (Bug#22694) * lisp/dired.el (dired-mark-files-containing-regexp): Clarify that for files visited in buffers, 'dired-mark-files-containing-regexp' searches the buffer rather than the file on disk. (Bug#22694)
-rw-r--r--doc/emacs/dired.texi8
-rw-r--r--lisp/dired.el7
2 files changed, 13 insertions, 2 deletions
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index 8a72805f7fc..ea48a26500c 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -550,7 +550,13 @@ Mark (with @samp{*}) all files whose @emph{contents} contain a match for
550the regular expression @var{regexp} 550the regular expression @var{regexp}
551(@code{dired-mark-files-containing-regexp}). This command is like 551(@code{dired-mark-files-containing-regexp}). This command is like
552@kbd{% m}, except that it searches the file contents instead of the file 552@kbd{% m}, except that it searches the file contents instead of the file
553name. 553name. Note that if a file is visited in an Emacs buffer, this command
554will look in the buffer without revisiting the file, so the results
555might be inconsistent with the file on disk if its contents has changed
556since it was last visited. If you don't want this, you may wish
557reverting the files you have visited in your buffers, or turning on
558the @code{auto-revert} mode in those buffers, before invoking this
559command. @xref{Reverting}.
554 560
555@item C-/ 561@item C-/
556@itemx C-x u 562@itemx C-x u
diff --git a/lisp/dired.el b/lisp/dired.el
index 5741872cfc8..f1adcb4c3db 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3353,7 +3353,12 @@ object files--just `.o' will mark more than you might think."
3353(defun dired-mark-files-containing-regexp (regexp &optional marker-char) 3353(defun dired-mark-files-containing-regexp (regexp &optional marker-char)
3354 "Mark all files with contents containing REGEXP for use in later commands. 3354 "Mark all files with contents containing REGEXP for use in later commands.
3355A prefix argument means to unmark them instead. 3355A prefix argument means to unmark them instead.
3356`.' and `..' are never marked." 3356`.' and `..' are never marked.
3357
3358Note that if a file is visited in an Emacs buffer, this command will
3359look in the buffer without revisiting the file, so the results might
3360be inconsistent with the file on disk if its contents has changed
3361since it was last visited."
3357 (interactive 3362 (interactive
3358 (list (read-regexp (concat (if current-prefix-arg "Unmark" "Mark") 3363 (list (read-regexp (concat (if current-prefix-arg "Unmark" "Mark")
3359 " files containing (regexp): ") 3364 " files containing (regexp): ")