Subject: bug#12655: 24.2; Cannot discover automatic-all or other multi-buffer replacement commands

From: Juri Linkov <[email-masked]>
Date: Tue, 16 Oct 2012 01:16:03 +0300

> It should be somewhere that is controlled by the multifile
> map being hooked into the keymap. The place that documents the current
> keymap, i.e. the mode help, seems to be a logical place for this.

Then the right place to document it is in `query-replace-help':

=== modified file 'lisp/replace.el'
--- lisp/replace.el	2012-10-05 21:27:50 +0000
+++ lisp/replace.el	2012-10-15 21:52:54 +0000
@@ -1604,9 +1604,12 @@ (defconst query-replace-help
 C-r to enter recursive edit (\\[exit-recursive-edit] to get out again),
 C-w to delete match and recursive edit,
 C-l to clear the screen, redisplay, and offer same replacement again,
-! to replace all remaining matches with no more questions,
+! to replace all remaining matches in this buffer with no more questions,
 ^ to move point back to previous match,
-E to edit the replacement string"
+E to edit the replacement string.
+In multi-buffer replacements type `Y' to replace all remaining
+matches in all remaining buffers with no more questions,
+`N' to skip to the next buffer without replacing remaining matches
+in the current buffer."
   "Help message while in `query-replace'.")

> Might it be more logical to mention it in the documentation "(emacs)
> Query Replace", where all the other keystrokes are documented?

Right, with a link from (info "(emacs) Tags Search") to
(info "(emacs) Query Replace") (this link is fixed below)
this can be documented in (info "(emacs) Query Replace"):

=== modified file 'doc/emacs/search.texi'
--- doc/emacs/search.texi	2012-09-30 09:18:38 +0000
+++ doc/emacs/search.texi	2012-10-15 21:57:19 +0000
@@ -1239,6 +1239,19 @@ @node Query Replace
 @item !
 to replace all remaining occurrences without asking again.
 
+@item Y @r{(Upper-case)}
+to replace all remaining occurrences in all remaining buffers in
+multi-buffer replacements (like the Dired `Q' command which performs
+query replace on selected files).  It answers this question and all
+subsequent questions in the series with "yes", without further
+user interaction.
+
+@item N @r{(Upper-case)}
+to skip to the next buffer in multi-buffer replacements without
+replacing remaining occurrences in the current buffer.  It answers
+this question "no", gives up on the questions for the current buffer,
+and continues to the next buffer in the sequence.
+
 @item ^
 to go back to the position of the previous occurrence (or what used to
 be an occurrence), in case you changed it by mistake or want to

=== modified file 'doc/emacs/maintaining.texi'
--- doc/emacs/maintaining.texi	2012-10-02 06:44:30 +0000
+++ doc/emacs/maintaining.texi	2012-10-15 21:59:41 +0000
@@ -2221,7 +2221,7 @@ @node Tags Search
 reads a regexp to search for and a string to replace with, just like
 ordinary @kbd{M-x query-replace-regexp}.  It searches much like @kbd{M-x
 tags-search}, but repeatedly, processing matches according to your
-input.  @xref{Replace}, for more information on query replace.
+input.  @xref{Query Replace}, for more information on query replace.
 
 @vindex tags-case-fold-search
 @cindex case-sensitivity and tags search