From: Mauro Aranda <maurooaranda@gmail.com>
To: 72404@debbugs.gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>,
Stephen Berman <stephen.berman@gmx.net>,
jm@pub.pink, juri@linkov.net
Subject: bug#72404: 30.0.60; Customization of options is broken
Date: Wed, 1 Jan 2025 08:31:14 -0300 [thread overview]
Message-ID: <48d661cd-a77f-4974-95d8-0672cc1c73e2@gmail.com> (raw)
In-Reply-To: <86a5hxv6cp.fsf@mail.linkov.net>
[-- Attachment #1: Type: text/plain, Size: 2863 bytes --]
Stephen Berman <stephen.berman@gmx.net> writes:
> On Sun, 04 Aug 2024 10:49:52 +0300 Eli Zaretskii <eliz@gnu.org> wrote:
>
>>> From: Stephen Berman <stephen.berman@gmx.net>
>>> Cc: john muhl <jm@pub.pink>, juri@linkov.net, maurooaranda@gmail.com,
>>> 72404@debbugs.gnu.org
>>> Date: Thu, 01 Aug 2024 19:28:04 +0200
>>>
>>> On Thu, 01 Aug 2024 12:12:52 +0200 Stephen Berman
<stephen.berman@gmx.net> wrote:
>>>
>>> I did happen to have a bit more time for this problem, and I think I've
>>> found the cause, a single line in commit 8d354925ddb:
>>>
>>> diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
>>> index 693991a6f3e..aa653549dad 100644
>>> --- a/lisp/wid-edit.el
>>> +++ b/lisp/wid-edit.el
>>> @@ -2549,7 +2549,8 @@ widget-checklist-add-item
>>> (t
>>> (widget-create-child-value
>>> widget type (car (cdr chosen)))
>>> - (widget-specify-selected child)))))
>>> + ;; (widget-specify-selected child)
>>> + ))))
>>> (t
>>> (error "Unknown escape `%c'" escape)))))
>>> ;; Update properties.
>>>
>>> With this line commented out as in the above patch, I get the expected
>>> value when carrying out Juri's recipe. Moreover, after making that
>>> change, I then briefly tested customizing the face widget-unselected
>>> (which the problematic commit added) to inherit from the default face
>>> and it shows the labels of unselected check boxes in the default face,
>>> as it should. So maybe deleting the commented out line above and
>>> leaving the rest of the change is a sufficient fix. But I have to
admit
>>> I don't know why that line causes the problem, and I haven't done
enough
>>> testing of this change to the widget-unselected face feature, so
this is
>>> just a status report.
>>
>> Thanks, I installed the above fix.
>
> Thanks, this seems at least a plausible stopgap.
>
>> It turns out the same problem also caused bug#72156, so I've now
>> merged them.
>>
>> I'm leaving this bug open, in the hope that you or someone else will
>> find the root cause for the regression and fix it.
>
> I will try to debug it further, but I do hope Mauro or someone else more
> familiar with the widget and custom code than I am will look into it.
>
> Steve Berman
Looks to me that it's a matter of order of function calls. The return
value of widget-create-child-value was used for setting child.
I found this by using widget-browse-at at the checkbox. I navigated to
the checkbox parent, the set widget, and saw that only the unselected
children were specified as children of the set widget.
The attached patch should fix it.
[-- Attachment #2: 0001-Fix-checkbox-s-child-creation.patch --]
[-- Type: text/x-patch, Size: 1251 bytes --]
From 8b1c19540c5ef873062e9389acb156dafc4f875c Mon Sep 17 00:00:00 2001
From: Mauro Aranda <maurooaranda@gmail.com>
Date: Wed, 1 Jan 2025 08:22:45 -0300
Subject: [PATCH] Fix checkbox's child creation
* lisp/wid-edit.el (widget-checklist-add-item): Swap function
calls so that child is actually a widget. (Bug#72156)
---
lisp/wid-edit.el | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index bf3a1141baf..3acb77dd7db 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -2549,12 +2549,9 @@ widget-checklist-add-item
(widget-create-child-value
widget type (cdr chosen)))
(t
- (widget-create-child-value
- widget type (car (cdr chosen)))
- ;; This somehow breaks :options and other
- ;; Custom features.
- ;; (widget-specify-selected child)
- ))))
+ (widget-specify-selected child)
+ (widget-create-child-value
+ widget type (car (cdr chosen)))))))
(t
(error "Unknown escape `%c'" escape)))))
;; Update properties.
--
2.34.1
prev parent reply other threads:[~2025-01-01 11:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 17:25 bug#72404: 30.0.60; Customization of options is broken Juri Linkov
2024-07-31 18:04 ` Eli Zaretskii
2024-07-31 20:18 ` john muhl
2024-08-01 5:09 ` Eli Zaretskii
2024-08-01 10:12 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-01 17:28 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-04 7:49 ` Eli Zaretskii
2024-08-04 10:00 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-01 11:31 ` Mauro Aranda [this message]
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=48d661cd-a77f-4974-95d8-0672cc1c73e2@gmail.com \
--to=maurooaranda@gmail.com \
--cc=72404@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jm@pub.pink \
--cc=juri@linkov.net \
--cc=stephen.berman@gmx.net \
/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).