From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#64046: 30.0.50; Quoting in customize choice tags Date: Thu, 22 Jun 2023 22:07:32 +0200 Message-ID: <87edm3tg57.fsf@gmx.net> References: <87v8frihny.fsf@gmx.net> <837cs7we2z.fsf@gnu.org> <47e13491-1654-db22-2f8b-f12195953232@gmail.com> <87o7lhrm2x.fsf@gmx.net> 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="17457"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Stefan Monnier , 64046@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 22 22:09:33 2023 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 1qCQcW-0004RT-Rm for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Jun 2023 22:09:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCQc9-00054f-Ik; Thu, 22 Jun 2023 16:09:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCQc6-00054N-I5 for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2023 16:09:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qCQc3-0005g5-1N for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2023 16:09:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qCQc2-00074T-GD for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2023 16:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jun 2023 20:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64046 X-GNU-PR-Package: emacs Original-Received: via spool by 64046-submit@debbugs.gnu.org id=B64046.168746449727119 (code B ref 64046); Thu, 22 Jun 2023 20:09:02 +0000 Original-Received: (at 64046) by debbugs.gnu.org; 22 Jun 2023 20:08:17 +0000 Original-Received: from localhost ([127.0.0.1]:36848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCQbI-00073K-NJ for submit@debbugs.gnu.org; Thu, 22 Jun 2023 16:08:17 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:54061) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCQbH-000738-Ct for 64046@debbugs.gnu.org; Thu, 22 Jun 2023 16:08:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1687464486; x=1688069286; i=stephen.berman@gmx.net; bh=SF3jwiQdqfY+yb01XbjPBBNe9xRLWdSOqLPF3C8zz38=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=R+n9kv0WuMx8p75fUsBzGfv0CGYg/zIYDHMYyR/SwHIF4UhHUUKmwAEBzDHTcWh+wPKYXYh He3Lhvy/Ad6WLmb1HMdfQeCGB3FKn1+bTGpnNuNsW9ZdsbL+lmxSfkI1bt+IaF8zcMLz9AdfD MU6AP3oA4H34D7w9Z3x8/v4DE8Mb+jXCP9eiVg/BmstflrQ38Fj/0Fbs0LT+pncZ7nAg9DE3a icGuoGTJe/yr1BJkROl7ykc1nGQ0QgdVn13gsgRwf085CQ9NZaaFH4hU5Ceca8svZmlS5UaWc 5yjS/qCRrhWd6dYhU1vR8QNIt4vcl5ApptAWE8dIlUzivZh5jByg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs ([89.246.37.91]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mi2Jt-1pYzFU43hx-00e3EY; Thu, 22 Jun 2023 22:08:06 +0200 In-Reply-To: <87o7lhrm2x.fsf@gmx.net> (Stephen Berman's message of "Thu, 15 Jun 2023 13:39:34 +0200") X-Provags-ID: V03:K1:kJwJiwBGTCKnV9Ck2Ux3afkUZM/NeJ58RhotWl3n10BMcaYFzWM SjDP9wmbKiXC67FfFWS/QgGNtbcGLMlme8IokIEm7ff+YRZ/rnRBQzxKgHieRaNL3WdtpZd 3IHX0vhNcknt+fQLRm4LkjAIpBrZvrD15tr1BEeLPNflklWkmJZ5Aj27T/OM2Ra+HNPG1Pv UFj4RwQabC8hz0JQviHQg== UI-OutboundReport: notjunk:1;M01:P0:HMTLWvTdgfg=;eDp6xnhbfqaeuaIEagFyvRMzKuv fRje13g2ECac1Oy9qGx7sNVKbhkGb6BhHydHl3f6SaNLHNUa5KWY1wJpMeEEC7lAjFRIHvuAl ZtOmoqWxgmePu+9BXmdLrLkMDKYGR2viQ77H9R3cnPrUNmNy/dSGkgEzlcX/iV2HfLwPb4bhs 279OgEPO6ithAH6lXOJiS2FDjGUTV2uf43Hueok1GgL7xAo2gbyWn4HZOrRb9xeK4+kt/NRK5 iLMPodYtzb3DFOPcgif7TQsB14LYt/y8TqVyuo0Y4a1IFDyUQg3uzjqaoDYwiOyWF5YqKI5eF AmmfLxu/9+Nq/Ulp0Y6Uy2n58YgQIf/ja5PNRtFS72vQJnWeCRT43p9bqEtNbQYM0C9coAVmO 5qEG9eLwsM+uCa0R9e6cz1w5ALH6MyzIsLsnRkPxEDk9AFuojK+U4D3mxzBIMmY6wdIYraKsK Dmho1hoa+t7pCO4/Qid/OX4lZIp3OEZX1+dcfiZu9yqv+LWhLYdPIEjVmKtJaa657g2yVkWxS vNAbsk5l3JvKks5A0UKFvlebUDPiX+eRjoZv9Y6GojgTQl/289+3q2SmkyohRe/9++FthFC+a NeEVRC9JWFEe2oq1eqzCS6vLVxHJh40Cd02x5GRiZ3a9DZTq6eCYCjtqu9Xa2xpXm9NscEzmR WeKE04+WS0UlQAEe46fd7D1P0bTsJrrGfu4ay4fWH5ve6k3J6WBfLg1dhdGEG1K+qu5cIjZNN ESE41TxjrNoWlP6J8H3ojRfsKQJ4AeZuPIlxYxS+vEgKZOtWGnZgFjPsKsIy1ISgEHqB9r9l 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263920 Archived-At: On Thu, 15 Jun 2023 13:39:34 +0200 Stephen Berman = wrote: > On Wed, 14 Jun 2023 17:05:32 -0300 Mauro Aranda = wrote: > >> Stephen Berman writes: >> >>> 0. emacs -Q >>> 1. Evaluate the following defcustom: >>>=C2=A0=C2=A0=C2=A0 (defcustom my-test "a" >>>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "Test." >>>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 :type '(choice (string :tag "Use `a'" "a") >>>=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2= =A0 (string :tag "Use `b'" "b"))) >>> 2. M-x customize-option RET my-test RET >>> 3. In the buffer *Customize Option: My Test* note that in the string >>>=C2=A0=C2=A0=C2=A0 "Use =E2=80=98a=E2=80=99" following the "Value Menu" = button the quote marks are in >>>=C2=A0=C2=A0=C2=A0 the "curve" style (=E2=80=98=E2=80=99). >>> 4. Put point on the "Value Menu" button and type RET. >>> 5. The buffer " widget-choose" contains these lines: >>>=C2=A0=C2=A0=C2=A0 0 =3D Use =E2=80=98a=E2=80=99 >>>=C2=A0=C2=A0=C2=A0 1 =3D Use =E2=80=98b=E2=80=99 >>>=C2=A0=C2=A0=C2=A0 Note that the quote marks in this buffer are also in = the "curve" >>>=C2=A0=C2=A0=C2=A0 style. >>> 6. With the mouse pointer over the "Value Menu" button press mouse-1, >>>=C2=A0=C2=A0=C2=A0 popping up a menu titled "Choice" containing these it= ems: >>>=C2=A0=C2=A0=C2=A0 Use `a' >>>=C2=A0=C2=A0=C2=A0 Use `b' >>>=C2=A0=C2=A0=C2=A0 Note that the quote marks in this menu are in the "gr= ave" style (`') >>>=C2=A0=C2=A0=C2=A0 instead of the "curve" style. >>> >>> The use of the "curve" style in the " widget-choose" buffer is due to >>> commit bd3b426ebb7a60045839e97c9da9bfd249fab1f1, but that commit did not >>> take popup menus into account.=C2=A0 The attached patch does so. Since = the >>> status quo ante long predates emacs-29 and this is just a stylistic bug, >>> I made the patch against master. >>> >>> In this patch I chose to apply substitute-command-keys just once at the >>> beginning of the function `widget-choose', rather than several times >>> within the function, but I restricted its application to item tags, so >>> other uses of the ITEMS argument should not be affected (and my brief >>> testing hasn't found any problem with the patch). >> >> By moving the call to substitute-command-keys to the beginning, extended >> menus simplified with widget--simplify-menu don't benefit anymore from >> it.=C2=A0 Perhaps that won't ever show up as a problem, but I think we s= hould >> guard against that. >> >> To do that, maybe widget--simplify-menu can call substitute-command-keys >> when it builds the simplified menu. > > Thanks for the feedback. You're right, that patch is too superficial; > it also fails to do substitution in popup extended menus like the one > produced by clicking the "State" button, with the result that in the > item "Revert This Session's Customization" the apostrophe is not > displayed in the "curve" style. So I revised the patch, attached below, > to iterate over the elements of each item in ITEMS, and it now appears > to handle substitution with the "State" button display correctly, both > as popup menu and as text menu buffer. The latter is the result of > applying widget--simplify-menu, if I debugged correctly, so I think this > answers your concerns (though the text menu buffer already shows the > substitution independently of my patch, due to commit bd3b426ebb). Or > have I misunderstood your concerns about widget--simplify-menu? If so, > can you give an example where the new patch fails? Just pinging in case this fell under the radar. If there's no response, what's the next step forward? Steve Berman