unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Augusto Stoffel <arstoffel@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 54173@debbugs.gnu.org
Subject: bug#54173: 28.0.91; Training wheels for query-replace
Date: Sun, 27 Feb 2022 09:51:42 +0100	[thread overview]
Message-ID: <87sfs4wv35.fsf@gmail.com> (raw)
In-Reply-To: <83tuckogza.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 27 Feb 2022 10:23:37 +0200")

On Sun, 27 Feb 2022 at 10:23, Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Augusto Stoffel <arstoffel@gmail.com>
>> Cc: 54173@debbugs.gnu.org
>> Date: Sun, 27 Feb 2022 08:55:51 +0100
>> 
>> On Sun, 27 Feb 2022 at 08:54, Eli Zaretskii <eliz@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.





  reply	other threads:[~2022-02-27  8:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-26 22:15 bug#54173: 28.0.91; Training wheels for query-replace Augusto Stoffel
2022-02-27  6:54 ` Eli Zaretskii
2022-02-27  7:55   ` Augusto Stoffel
2022-02-27  8:23     ` Eli Zaretskii
2022-02-27  8:51       ` Augusto Stoffel [this message]
2022-02-27  9:24         ` Eli Zaretskii
2022-02-27 10:17           ` Augusto Stoffel
2022-02-27 10:55             ` Eli Zaretskii
2022-02-27 16:11               ` bug#54173: [External] : " Drew Adams
2022-02-27 13:10             ` Lars Ingebrigtsen
2022-02-27 13:46               ` Augusto Stoffel
2022-03-03 16:41                 ` Augusto Stoffel
2022-03-10 19:24                   ` Juri Linkov
2022-03-10 19:28                     ` Lars Ingebrigtsen
2022-03-10 19:44                       ` Juri Linkov
2022-03-12 16:58                         ` Lars Ingebrigtsen
2022-03-10 19:20     ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sfs4wv35.fsf@gmail.com \
    --to=arstoffel@gmail.com \
    --cc=54173@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).