Subject: bug#45273: 27.1: Cannot display options help text for query-replace

From: Mark Harig <[email-masked]>
Date: Wed, 16 Dec 2020 17:43:07 +0000 (UTC)

Emacs Maintainers,

  The following two issues concerning Query Replace were
found in GNU Emacs version 27.1, started with 'emacs -Q':

1. It appears that it is not possible to display the options
available when using `query-replace' (M-%).

According to the Emacs manual at (emacs)Query Replace:

----
‘C-h’
‘?’
‘<F1>’
    to display a message summarizing these options.  Then you must type
    another character to specify what to do with this occurrence.
----

  Yet when any of these three keys are pressed after the
"Query replace: " prompt is displayed in the minibuffer,
there is no *Help* buffer displayed.  Based on the text in
the manual, above, shouldn't we expect to see a help buffer
displayed with a summary of the keybindings for
`query-replace'?

  A cursory look inside replace.el shows that it has the
DEFCONST `query-replace-help' defined to provide the
information that is described in the Emacs manual, but this
function is not being called when one of the keys C-h, [F1],
or ? is pressed.

2. The DEFCONST `query-replace-help' describes 'E' (upper-case
e) as:

----
E to edit the replacement string.
----

But the Emacs manual at (emacs)Query Replace describes 'e'
(lower-case e) as:

----
`e'
    to edit the replacement string in the minibuffer.  When you exit
    the minibuffer by typing <RET>, the minibuffer contents replace the
    current occurrence of the pattern.  They also become the new
    replacement string for any further occurrences.
----

In replace.el, the DEFVAR `query-replace-map' has both e and
E mapped to `edit-replacement'.  So both keys should work,
but neither the help text nor the info manual document thatboth keys can be used.

Note: The following search did not find the above issues inthe GNU Bug Tracker:
https://debbugs.gnu.org/cgi/pkgreport.cgi?include=subject%3Aquery-replace;package=emacs

--