GNU bug report logs - #45273
27.1: Cannot display options help text for query-replace

Previous Next

Package: emacs;

Reported by: Mark Harig <idirectscm <at> aim.com>

Date: Wed, 16 Dec 2020 17:44:02 UTC

Severity: normal

Found in version 27.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45273 in the body.
You can then email your comments to 45273 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#45273; Package emacs. (Wed, 16 Dec 2020 17:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mark Harig <idirectscm <at> aim.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 16 Dec 2020 17:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mark Harig <idirectscm <at> aim.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 27.1: Cannot display options help text for query-replace
Date: Wed, 16 Dec 2020 17:43:07 +0000 (UTC)
[Message part 1 (text/plain, inline)]
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

-- 
[Message part 2 (text/html, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 16 Dec 2020 19:16:01 GMT) Full text and rfc822 format available.

Notification sent to Mark Harig <idirectscm <at> aim.com>:
bug acknowledged by developer. (Wed, 16 Dec 2020 19:16:01 GMT) Full text and rfc822 format available.

Message #10 received at 45273-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mark Harig <idirectscm <at> aim.com>
Cc: 45273-done <at> debbugs.gnu.org
Subject: Re: bug#45273: 27.1: Cannot display options help text for
 query-replace
Date: Wed, 16 Dec 2020 21:15:33 +0200
> Date: Wed, 16 Dec 2020 17:43:07 +0000 (UTC)
> From: Mark Harig via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> 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.

This citation is incomplete: you've taken one item from a long list of
characters one can type, and that list begins with this text:

     The characters you can type when you are shown a match for the string
  or regexp are:

So the Help character will work if you type it after you already
provided the string to replace and its replacement, and Emacs shows
you the first match -- which is when this help is relevant.  You don't
need this help earlier because none of those characters can be used
before the first match is found.

> 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.

I added 'E' to the text in the manual on the emacs-27 branch.

With that, I'm closing this bug report.  Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45273; Package emacs. (Wed, 16 Dec 2020 20:01:01 GMT) Full text and rfc822 format available.

Message #13 received at 45273-done <at> debbugs.gnu.org (full text, mbox):

From: Mark Harig <idirectscm <at> aim.com>
To: "eliz <at> gnu.org" <eliz <at> gnu.org>
Cc: "45273-done <at> debbugs.gnu.org" <45273-done <at> debbugs.gnu.org>
Subject: Re: bug#45273: 27.1: Cannot display options help text for
 query-replace
Date: Wed, 16 Dec 2020 19:59:56 +0000 (UTC)
[Message part 1 (text/plain, inline)]
-----Original Message-----
From: Eli Zaretskii <eliz <at> gnu.org>
To: Mark Harig <idirectscm <at> aim.com>
Cc: 45273-done <at> debbugs.gnu.org
Sent: Wed, Dec 16, 2020 2:15 pm
Subject: Re: bug#45273: 27.1: Cannot display options help text for query-replace

> This citation is incomplete: you've taken one item from a long list of
> characters one can type, and that list begins with this text:

 >    The characters you can type when you are shown a match for the string
 >  or regexp are:

> So the Help character will work if you type it after you already
> provided the string to replace and its replacement, and Emacs shows
> you the first match -- which is when this help is relevant.  You don't
> need this help earlier because none of those characters can be used
> before the first match is found.
Agreed.  I had mistakenly and too quickly assumed that the behavior would be the same as it is for C-s (isearch-forward).
> I added 'E' to the text in the manual on the emacs-27 branch.
>
> With that, I'm closing this bug report.  Thanks.
Thank you.
-- 
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 14 Jan 2021 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 156 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.