From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#54173: 28.0.91; Training wheels for query-replace Date: Sun, 27 Feb 2022 09:51:42 +0100 Message-ID: <87sfs4wv35.fsf@gmail.com> References: <87a6edi8b3.fsf@gmail.com> <835yp0pzoh.fsf@gnu.org> <87wnhgwxo8.fsf@gmail.com> <83tuckogza.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33995"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 54173@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 27 09:52:53 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nOFIS-0008ie-HK for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Feb 2022 09:52:52 +0100 Original-Received: from localhost ([::1]:43144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOFIR-0003xs-5p for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Feb 2022 03:52:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOFHe-0003vj-4V for bug-gnu-emacs@gnu.org; Sun, 27 Feb 2022 03:52:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOFHd-0002k9-R0 for bug-gnu-emacs@gnu.org; Sun, 27 Feb 2022 03:52:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOFHd-0007CY-OR for bug-gnu-emacs@gnu.org; Sun, 27 Feb 2022 03:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Feb 2022 08:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54173 X-GNU-PR-Package: emacs Original-Received: via spool by 54173-submit@debbugs.gnu.org id=B54173.164595191227665 (code B ref 54173); Sun, 27 Feb 2022 08:52:01 +0000 Original-Received: (at 54173) by debbugs.gnu.org; 27 Feb 2022 08:51:52 +0000 Original-Received: from localhost ([127.0.0.1]:56832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOFHU-0007C8-7T for submit@debbugs.gnu.org; Sun, 27 Feb 2022 03:51:52 -0500 Original-Received: from mail-ej1-f42.google.com ([209.85.218.42]:35341) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOFHS-0007Bt-7H for 54173@debbugs.gnu.org; Sun, 27 Feb 2022 03:51:50 -0500 Original-Received: by mail-ej1-f42.google.com with SMTP id qk11so19121096ejb.2 for <54173@debbugs.gnu.org>; Sun, 27 Feb 2022 00:51:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=xKtP7E0prVM4H/NNGScPAp5IUQxNVicU2so2/gFZ7dg=; b=q3Hsf4yyV811FtdMNYyzVs72RH8WBquN/XTU36Zute7SbhId810irGOeomsqjMpHfP JPCiC+OhTgCiB9UG09FtvxxEiJ5dF1DIj2KjnerDeP8vJCq3grLnMnftRe9oKdBPmNmO oAyQw1/tlMQiEtTmdfqDvcCEIvz05GvyGLqal03zizpiXd6yyA31/P7jdeIP+E9d4dn3 KhaXC7y0GLrPNyossEr/AHen/fWg7qi61mwbGijZJtIRDV2MUFYyXXn86Yc9vsYCguQK KW8Yu1BiVd2a6nJYbgkEWFCDLFFxB59cuP4HXUH6aDpOkOTzAKt5YPAd8uUVt7uPQCRI 4Rgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=xKtP7E0prVM4H/NNGScPAp5IUQxNVicU2so2/gFZ7dg=; b=E9taCYRcwJMOJcp8foayrxS1gxYBLKTkIfFmTIRsPuGZWh1RfUftFMzRyM7aRgPr9u bu+3EUq5GLzUPJ74pOBBNrwb333SAXVdPJEbtxiljkDW5lA2RfOSyMOidlnHUdV9Hrqg Ydlp5qeBBRhzeRKjDGeUmfRxAyV9NCHgoEnIaEBagS2KjSFm0zbIfKJjnf81xiroW+MU gE/mPkBhyWb/bFjLiwQrHGf3FvQU1vxmAr3R4wlLe9l1rbXPQhuh1ckcPzkxq/Ff/8Zz a6dEeq5Er0LzvB1J1Hhc5+DKKCMo+hRfmkFt3tP8Bu4h6plZLJ1P4+L/DoeqoHx0Ts+Q 2yYA== X-Gm-Message-State: AOAM533Q4cWawXJeaBuAAv6I9Ek86pp5PnDNrCWl1nYSLyN8eXAMp0AS cbau/YmmN72nWz/U0qT1DmfNpFyUuj/v8A== X-Google-Smtp-Source: ABdhPJxU+a3wSUT9XaPki8wvXykEdGjjtGWw6C0LJYk90hzxaT8yKzjz3yEnN38Eae/5epcsIXoEXg== X-Received: by 2002:a17:906:5245:b0:6b8:78e0:5649 with SMTP id y5-20020a170906524500b006b878e05649mr11816780ejm.520.1645951904122; Sun, 27 Feb 2022 00:51:44 -0800 (PST) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::758e]) by smtp.gmail.com with ESMTPSA id r11-20020aa7cfcb000000b00412c58c43ccsm4181577edy.37.2022.02.27.00.51.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Feb 2022 00:51:43 -0800 (PST) In-Reply-To: <83tuckogza.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 27 Feb 2022 10:23:37 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227707 Archived-At: On Sun, 27 Feb 2022 at 10:23, Eli Zaretskii wrote: >> From: Augusto Stoffel >> Cc: 54173@debbugs.gnu.org >> Date: Sun, 27 Feb 2022 08:55:51 +0100 >>=20 >> On Sun, 27 Feb 2022 at 08:54, Eli Zaretskii wrote: >>=20 >> > 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. >>=20 >> I agree, and I suggested a defcustom here so the user can choose between >> two predefined options, the default prompt: >>=20 >> ``` >> Query replacing a with b: (=E2=80=98?=E2=80=99 for help) >> ``` >>=20 >> and a two-line prompt including a little summary: >>=20 >> ``` >> Query replacing a with b: (=E2=80=98?=E2=80=99 for help) >> Replace =E2=80=98y=E2=80=99 once, =E2=80=98.=E2=80=99 and exit, =E2=80= =98!=E2=80=99 all; skip to =E2=80=98n=E2=80=99 next, =E2=80=98^=E2=80=99 pr= evious; =E2=80=98U=E2=80=99 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 =E2=80=98y=E2=80=99 and =E2=80=98n=E2=80=99 are intuitive enough th= at they don't need a reminder. But mentioning the more uncommon ones (=E2=80=98.=E2=80=99 and s= o on) without talking about =E2=80=98y=E2=80=99 and =E2=80=98n=E2=80=99 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 =E2=80=98y=E2=80=99 once, =E2=80=98.=E2= =80=99 and exit, =E2=80=98!=E2=80=99 all; skip to =E2=80=98n=E2=80=99 next,= =E2=80=98^=E2=80=99 previous; =E2=80=98U=E2=80=99 undo all; =E2=80=98?=E2= =80=99 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? >>=20 >> 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.