emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64046: closed (30.0.50; Quoting in customize choice tags)


From: GNU bug Tracking System
Subject: bug#64046: closed (30.0.50; Quoting in customize choice tags)
Date: Sat, 24 Jun 2023 08:51:01 +0000

Your message dated Sat, 24 Jun 2023 10:50:11 +0200
with message-id <87a5wpfdmk.fsf@gmx.net>
and subject line Re: bug#64046: 30.0.50; Quoting in customize choice tags
has caused the debbugs.gnu.org bug report #64046,
regarding 30.0.50; Quoting in customize choice tags
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
64046: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64046
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 30.0.50; Quoting in customize choice tags Date: Tue, 13 Jun 2023 16:02:57 +0200 User-agent: Gnus/5.13 (Gnus v5.13)
0. emacs -Q
1. Evaluate the following defcustom:
   (defcustom my-test "a"
     "Test."
     :type '(choice (string :tag "Use `a'" "a")
                    (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
   "Use ‘a’" following the "Value Menu" button the quote marks are in
   the "curve" style (‘’).
4. Put point on the "Value Menu" button and type RET.
5. The buffer " widget-choose" contains these lines:
   0 = Use ‘a’
   1 = Use ‘b’
   Note that the quote marks in this buffer are also in the "curve"
   style.
6. With the mouse pointer over the "Value Menu" button press mouse-1,
   popping up a menu titled "Choice" containing these items:
   Use `a'
   Use `b'
   Note that the quote marks in this menu are in the "grave" style (`')
   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.  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).

The patch also takes the opportunity to replace two unnecessary uses of
`let*' in `widget-choose', in one case by `let' and in the other by
foregoing let-bound variables altogether and just using the values in
place, since they occur only once each in the lines immediately
following the eliminated `let*'.


In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.6) of 2023-06-13 built on strobelfssd
Repository revision: ba349aa32e98a53146794197c316f4765598ddbd
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Linux From Scratch r11.3-100-systemd

Configured using:
 'configure -C --with-xwidgets 'CFLAGS=-Og -g3'
 PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM
XINPUT2 XPM XWIDGETS GTK3 ZLIB

Attachment: txtvLt1rP3Oyw.txt
Description: widget-choose patch


--- End Message ---
--- Begin Message --- Subject: Re: bug#64046: 30.0.50; Quoting in customize choice tags Date: Sat, 24 Jun 2023 10:50:11 +0200 User-agent: Gnus/5.13 (Gnus v5.13)
On Sat, 24 Jun 2023 09:37:34 +0300 Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Stephen Berman <stephen.berman@gmx.net>
>> Cc: 64046@debbugs.gnu.org,  Eli Zaretskii <eliz@gnu.org>,  Stefan Monnier
>>  <monnier@iro.umontreal.ca>
>> Date: Sat, 24 Jun 2023 00:18:48 +0200
>> 
>> On Thu, 22 Jun 2023 19:59:26 -0300 Mauro Aranda <maurooaranda@gmail.com> 
>> wrote:
>> 
>> > Stephen Berman <stephen.berman@gmx.net> writes:
>> >
>> >>> 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
>> >
>> > It did, thanks for the ping.
>> >
>> > Since there's no problem with widget--simplify-menu, the patch looks
>> > good to me.
>> 
>> Thanks.  So Eli, should this go into master, since it's not a
>> regression, or is it ok to install this to the release branch?  It does
>> seem pretty safe, since it's only applying substitute-command-keys in a
>> few more places in widget-choose.
>
> Pleased install on master.  The problem is very minor and we have
> lived with it for many years, so it can wait a bit more.

Done with commit 6d55d93379f, closing the bug.  Thanks.

Steve Berman


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]