GNU bug report logs -
#54173
28.0.91; Training wheels for query-replace
Previous Next
Reported by: Augusto Stoffel <arstoffel <at> gmail.com>
Date: Sat, 26 Feb 2022 22:16:02 UTC
Severity: normal
Tags: wontfix
Found in version 28.0.91
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 54173 <at> debbugs.gnu.org (full text, mbox):
On Sun, 27 Feb 2022 at 10:23, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Augusto Stoffel <arstoffel <at> gmail.com>
>> Cc: 54173 <at> debbugs.gnu.org
>> Date: Sun, 27 Feb 2022 08:55:51 +0100
>>
>> On Sun, 27 Feb 2022 at 08:54, Eli Zaretskii <eliz <at> gnu.org> wrote:
>>
>> > I don't think it's a good idea to leave documentation and help to
>> > users. I'd rather we made the help text better, or maybe introduce a
>> > key to display a more detailed help text. Emacs should not have
>> > sub-optimal help text.
>>
>> I agree, and I suggested a defcustom here so the user can choose between
>> two predefined options, the default prompt:
>>
>> ```
>> Query replacing a with b: (‘?’ for help)
>> ```
>>
>> and a two-line prompt including a little summary:
>>
>> ```
>> Query replacing a with b: (‘?’ for help)
>> Replace ‘y’ once, ‘.’ and exit, ‘!’ all; skip to ‘n’ next, ‘^’ previous; ‘U’ undo all.
>
> But since '?' produces a more detailed help, and that help text stays
> on display thereafter, do we really need one more variant? Maybe the
> default message could be expanded instead (but not to such a long
> text, which would resize the mini-window in many cases)?
I think ‘y’ and ‘n’ are intuitive enough that they don't need a
reminder. But mentioning the more uncommon ones (‘.’ and so on) without
talking about ‘y’ and ‘n’ is weird.
So I can't see any meaningful options between the status quo and my
suggestion above.
The way I use Emacs, this would be a perfectly fine message with no risk
of resizing the mini-window:
```
Query replacing a with b: (replace ‘y’ once, ‘.’ and exit, ‘!’ all; skip to ‘n’ next, ‘^’ previous; ‘U’ undo all; ‘?’ help)
```
One idea would be to choose between the short and long messages based on
the size of the miniwindow as well as the length regexp and replacement
text.
>> > Can you tell why you have trouble remembering some of the keys, and
>> > how changing the help message could countermand that?
>>
>> My issue is mainly with '.' and '^'. I rarely need those operations, so
>> by the time I do I already forgot the keys. With a summary help line
>> below the prompt, it's very hard to not be reminded.
>
> Then how about adding '.' and '^' to the default help text?
>
>> PS: Should we define 'p' as a synonym for '^' in 'query-replace-map'?
>
> Probably.
This bug report was last modified 3 years and 67 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.