GNU bug report logs - #69941
30.0.50; Faulty fontification of radio button widgets

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Stephen Berman <stephen.berman@HIDDEN>; Done: Eli Zaretskii <eliz@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 69941-done <at> debbugs.gnu.org:


Received: (at 69941-done) by debbugs.gnu.org; 6 Feb 2025 15:29:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 06 10:29:34 2025
Received: from localhost ([127.0.0.1]:58868 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tg3os-0000xE-BQ
	for submit <at> debbugs.gnu.org; Thu, 06 Feb 2025 10:29:34 -0500
Received: from mout.gmx.net ([212.227.15.15]:48237)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>)
 id 1tg3op-0000wy-Io
 for 69941-done <at> debbugs.gnu.org; Thu, 06 Feb 2025 10:29:32 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1738855756; x=1739460556; i=stephen.berman@HIDDEN;
 bh=QY2W43c2ZYGy+iMWBtv52GfplsGjTSrNgmR8n162nFk=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=sf7wy3VqHJgnnnnH86FUqJPWHghGN6POWFQ3fOIjkAfMPrPFqi3nMwqmxh9/QM7Q
 lXQCnWojsHeolBXC7t8XakPIXaNkJM3V/oiMfWNcWl61yHD6rxUG9A2l4IBgDnVxo
 HolrlXZGnjSM4n3rrHJsJ5nml7N7qdJPGFE0IaLeTJurC589LK0b7ZAR/kv5CTlX1
 ee90cufszmacd9YSYof8FIxskl5yohPae8EbeHd7/a36nm8OB1hFm7jqQegxO3oR0
 dgCvrx3Lbyv2IOiYZfLv3yxhoq7FOvjHj+PfLwAO9lkKdsN+XYR1IOl/iZvMgnoUx
 yrIg2/lK34+h+vz2IQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfssd ([88.130.48.106]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mf0BM-1tDrwE2jCE-00ZLtP; Thu, 06
 Feb 2025 16:29:16 +0100
From: Stephen Berman <stephen.berman@HIDDEN>
To: Mauro Aranda <maurooaranda@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <07b99430-265a-40f9-8a83-034fd78b8fe2@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN>
 <87le3fljk5.fsf@HIDDEN> <864ja3d0h5.fsf@HIDDEN>
 <87cyorldxf.fsf@HIDDEN>
 <add886d6-aecf-4664-be5a-2ccc718458cb@HIDDEN>
 <jwvfrlit6u0.fsf-monnier+emacs@HIDDEN>
 <67b58a2b-7428-4625-b431-d7cbafa0ea52@HIDDEN>
 <jwvh65xsfpn.fsf-monnier+emacs@HIDDEN>
 <f284cdf5-db62-489b-ab9f-d9564cb4583e@HIDDEN>
 <86h65dg9m3.fsf@HIDDEN> <jwva5b4lyew.fsf-monnier+emacs@HIDDEN>
 <86seos8rlz.fsf@HIDDEN> <87pljvnoqm.fsf@HIDDEN>
 <07b99430-265a-40f9-8a83-034fd78b8fe2@HIDDEN>
Date: Thu, 06 Feb 2025 16:29:14 +0100
Message-ID: <87ldujnlbp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:md6Cj0dNbAZ+QX9qiWtyRu3MIUSWgWVrlNmSdlati2pkPppnJy4
 LEPqeQrCUDURtPu2rzqr0nlFSA5qddkhhND4YIOLFNA2xNV85ur0zRIPjELCktitlSPegrV
 GbE9lijT9y1hFAE7GSv2AvyjpoDyNAqnGnpE9Ybt1TuC5yKSdFVOGDTHdjKubkvLFrYhrR3
 coHcpHBcY9FXwpWbv8hUQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:2eaZ+MQqm80=;qcKq3mg9PhOLQIyt6nhfHFCb/EM
 r0xOQLcBYectLbjlmX3ejBfSZWiCAnhbng5OARQunHhhKY12vGIywb0bqH72TcPlZ+Fj5q0Js
 nuB+Z1mfkcRmyupcMw4FSwZ3jG5ZgRf9r0fJcBfUFFaZrG3R0RYDB6oSqVEAMCVi6ZjOoqtzV
 HJLq9gWbwZQRL2fbSMom+uKImMTPVihYL4PBZ79aYRj3+0GwR2Mqj5iG7v/n3iAThh9SSAlCy
 IeVLVnEoS0JmVIA3FlryEXjiuXd9te8W5cTKzLwTexx37BOUOIHbePp27KpLi40MxmO9xFnCY
 iB71E8p8bR2HAuE9D5vsKJHtSkJQYqt2kEobuUPrLMRf3EIWbffJYCd1CC88jPB7hx0XZo3lb
 RoqfTcV2tAxG/4xkHiGYGov5qnQBilwwvWcdetzaF3z4i5qQ9Rp5aJf3YJPoGqF94BNjAABDU
 nkf03xUsfxtMSY4RnzKpHC8GJtpgkeWid/YXM0gqUh2Wr5jKfWLnHNwpwum6dGlnaFTRroFLI
 UdaxpEUeCa1RH5NIFoCWvxDkO9vejPBHPIV1wf22AK+oUFSg/uD+KS6b+Tz9mDgCtlbEp7waP
 pxACtn/6lngpFI2onhZsIGGQTURcViuUtUZrvoNh3cFq8GFW+rz67wMjbHF9M3ELiaifr9P42
 Tl6YMC0XKtsgGTND45TgwUKMc/NkSiZw3WQ/pRK9hrUPG5EPscIb4CNIWNkOUGxZaIlIlspmt
 Tr8JBQkWDks/EF1AnZNTxdBuTJfSx7tG6HUKj7e1oY9NQ3kRGwuJdhjM/7W+ZIfoyTGbVJf1A
 h+Crej9lFIkHc7rC9rpPTsePmq+uAp6uTV6qYaMfdaZAVdnswJVYxnLnFpHONoUPfwcT9jxGM
 2dtGL46odUbOyIlcY5x86xUq5cohnjMAy7v+H+h7f9Ci4FjhE7MHLju4gpPrNNzHmMzZ7hvLb
 WodQ0LEnGrLQdD8OJldd1tKM/feTVR2YNow5vpFp0JDQzol/quUHdu9nuBynY+oNsLG2c1Wn+
 kfexG6QfOcfJO3IMpnp8BYbd7sEzRnBs9xAF687WxOb+meA4ABDgl21RSNcGlmWGDxJ8Zu6YG
 j/N1NyyYiCJC2o7luyMIwZWR/rJw/R2ENLmChplIYO09DXOOwM5QRLX8X76lSM3/q6cK2t0NQ
 owf0Tjfvy0cx5uEq55PzlI0O9TapAArwfox3Dwh0nq66ex2fgA0sWSP87CjHGxej0hO+0nDkE
 WmF5wB/4N63Rgj7ieZfSc9K3K9HFGyzhvQWhIS/AMjwZwEPI7kamCMmG5cU5tvtmoWiha4F3U
 qc1B7t2c6HRIK31FkuF4b0oe7udkVaL8GyV3/9V+Bv4/ZEjEFdx47ssPiBieWmwNk9reFoJhy
 YpurjnfjcsaAOWfTlOwhWHLqln9f7CPAww8LQPY/3/CVktdIIPUsdcAKto8z4XEaSm3cZUv88
 /gWQQAA==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 69941-done
Cc: 69941-done <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Thu, 6 Feb 2025 11:19:53 -0300 Mauro Aranda <maurooaranda@HIDDEN> wrote:

> Stephen Berman <stephen.berman@HIDDEN> writes:
>
>> On Wed, 05 Feb 2025 15:10:16 +0200 Eli Zaretskii <eliz@HIDDEN> wrote:
>>
>>>> From: Stefan Monnier <monnier@HIDDEN>
>>>> Cc: Mauro Aranda <maurooaranda@HIDDEN>,  stephen.berman@HIDDEN,
>>>>   69941 <at> debbugs.gnu.org
>>>> Date: Sun, 02 Feb 2025 18:28:39 -0500
>>>>
>>>> > Stefan, any further comments, or should we install this?
>>>>
>>>> We can install this, AFAIC.
>>>
>>> Thanks, installed on the master branch, and closing the bug.
>>
>> I've only now found time to try Mauro's patch, and while I can confirm
>> that it fixes the example of misfontification I reported in my OP,
>> unfortunately I still see the same kind of misfontification with the
>> program of mine that prompted my OP.  I haven't had time to investigate
>> further and I'm not sure when I will, but if and when I can provide more
>> information, I'll either reopen this bug or file a new one.
>>
>> Steve Berman
>
> Can you share some code? Either here or by private email?

Rather than posting or sending you the whole program as well as a data
file needed to run it and explaining how to use it, I'd prefer to try
and isolate the problem and provide a small and self-contained code
snippet to reproduce it.  I'll try to do that in the next few days.

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941-done <at> debbugs.gnu.org:


Received: (at 69941-done) by debbugs.gnu.org; 6 Feb 2025 14:20:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 06 09:20:08 2025
Received: from localhost ([127.0.0.1]:55010 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tg2jf-0004sh-KA
	for submit <at> debbugs.gnu.org; Thu, 06 Feb 2025 09:20:08 -0500
Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:43295)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maurooaranda@HIDDEN>)
 id 1tg2jc-0004s0-Mb
 for 69941-done <at> debbugs.gnu.org; Thu, 06 Feb 2025 09:20:05 -0500
Received: by mail-pj1-x1030.google.com with SMTP id
 98e67ed59e1d1-2f9ef7a3c3cso2580277a91.1
 for <69941-done <at> debbugs.gnu.org>; Thu, 06 Feb 2025 06:20:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738851598; x=1739456398; darn=debbugs.gnu.org;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:newsgroups:cc:to:subject:user-agent:mime-version:date
 :message-id:from:to:cc:subject:date:message-id:reply-to;
 bh=R5vjsrVWy/2O4DAO9XEbngH7GJz/8Mfq6e3JwUD1+BM=;
 b=frUvca+XxddAzqB5g2OEMTQoIzrYAQrkxV7lWG3l4QBpbl+4kK+q/N9txR7DlWT5WQ
 syyIlSxeH1dBCga+iMq09SXoFPNCfSEzHAvaF9qYazz7jsw5wbPPrgB/uagTrE1hOGcA
 IC+WkJ0kucI7tr62kVgQ6WXxL2o02ujKTzFKacyvQOK2g2AC320gsFS2LT5GLTjQFOc0
 Zu+6MYxKBwJF1Q4IFqFt3iHQwSEPF6nfpeAq8RTeLcmC4GBGIgjoysIvRmFXfYcteglh
 TIp6s32FkJOWJW9BokmQxcGsJJ7XWFi7Zz3GSCTNhgiUWJM+uX/qhiSj+LHTBzpZmC9A
 VSXg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738851598; x=1739456398;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:newsgroups:cc:to:subject:user-agent:mime-version:date
 :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=R5vjsrVWy/2O4DAO9XEbngH7GJz/8Mfq6e3JwUD1+BM=;
 b=CLf7xB26m2gRTt5dZYAAvebhqxyTp6++vdXz21ck/S/vLwSnO1ooy+ESLK3npnr/Hw
 P8lHBPttbuVvOe7yXsUq6fA0PEoubZ/wD7Mm6WJn9A0ZuOJ1UlcMlc6D8l/d97QLrLwg
 EUtaw8w2dm92IBiTV73CVtn69LpCAPGYX/PJlIh8BfdiApX71u4noh0P3QT/48fIP806
 LYXhieNKu/2Cc/t5TJj3sI3dWKVB47bggwGnb17bilZ6PXpIYEe6cud0G0BQ2wa4f1Hc
 BiEKhsDx0oKiKucbpHgVilCQbcq1BpfbsUJ1kf9L+qwO9oxCnFRMjJnNEoxHNG0CE/mU
 JgXw==
X-Gm-Message-State: AOJu0YyjYieuysyFFJjdq0PtKFHb8uuUGd06MNObNGmXhHcPEyQn7GZE
 ZOMad5lQ0HcwofGEcCSyfpRsccPhqxB60R5Lml+x41PQtGwHZfSG
X-Gm-Gg: ASbGnctC8UQlQqsju+qa3mn/HSPcG92NO50lIy/yMMZ6sT5dHyCv4ZqKfK8oZ9Pl3Pa
 rJ0qFWPV+8e7aXn5d8PDW/PjXD9ayv+wOR4cF8aRJFwiQNCU5njzm/bSiznH+4sCCEXWWnmHlg4
 XUyOPJQb92dBd5Hr8naPLBXF+6FRGTtOQGon5MnyzB9rNC0xrX169bbfMMi46aOVgMg8IIwjflt
 diNEKEYc0BZOsMH5WC7DsE59P8MFoCOMNrkkwe9HqloCfnsnuW8kOfIs1SgHXJscszndYVjOI1t
 p3TV+LNjFOn+FbASeR+AiQ==
X-Google-Smtp-Source: AGHT+IE4rX27NSda/VpqGvXv04Vityfo61vsioa6hrUqYOZrs8e09AzNc57S6rPd8x0qV/OTS5XaMw==
X-Received: by 2002:a17:90a:1c90:b0:2fa:176e:9705 with SMTP id
 98e67ed59e1d1-2fa176e981cmr1637906a91.10.1738851598286; 
 Thu, 06 Feb 2025 06:19:58 -0800 (PST)
Received: from [192.168.0.234] ([181.228.33.6])
 by smtp.gmail.com with ESMTPSA id
 98e67ed59e1d1-2f9e1d89903sm3645199a91.23.2025.02.06.06.19.56
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 06 Feb 2025 06:19:57 -0800 (PST)
Message-ID: <07b99430-265a-40f9-8a83-034fd78b8fe2@HIDDEN>
Date: Thu, 6 Feb 2025 11:19:53 -0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
To: Stephen Berman <stephen.berman@HIDDEN>
Newsgroups: gmane.emacs.bugs
References: <87h6gynx49.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN> <87le3fljk5.fsf@HIDDEN>
 <864ja3d0h5.fsf@HIDDEN> <87cyorldxf.fsf@HIDDEN>
 <add886d6-aecf-4664-be5a-2ccc718458cb@HIDDEN>
 <jwvfrlit6u0.fsf-monnier+emacs@HIDDEN>
 <67b58a2b-7428-4625-b431-d7cbafa0ea52@HIDDEN>
 <jwvh65xsfpn.fsf-monnier+emacs@HIDDEN>
 <f284cdf5-db62-489b-ab9f-d9564cb4583e@HIDDEN> <86h65dg9m3.fsf@HIDDEN>
 <jwva5b4lyew.fsf-monnier+emacs@HIDDEN> <86seos8rlz.fsf@HIDDEN>
 <87pljvnoqm.fsf@HIDDEN>
Content-Language: en-US
From: Mauro Aranda <maurooaranda@HIDDEN>
In-Reply-To: <87pljvnoqm.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 69941-done
Cc: 69941-done <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stephen Berman <stephen.berman@HIDDEN> writes:

 > On Wed, 05 Feb 2025 15:10:16 +0200 Eli Zaretskii <eliz@HIDDEN> wrote:
 >
 >>> From: Stefan Monnier <monnier@HIDDEN>
 >>> Cc: Mauro Aranda <maurooaranda@HIDDEN>,  stephen.berman@HIDDEN,
 >>>   69941 <at> debbugs.gnu.org
 >>> Date: Sun, 02 Feb 2025 18:28:39 -0500
 >>>
 >>> > Stefan, any further comments, or should we install this?
 >>>
 >>> We can install this, AFAIC.
 >>
 >> Thanks, installed on the master branch, and closing the bug.
 >
 > I've only now found time to try Mauro's patch, and while I can confirm
 > that it fixes the example of misfontification I reported in my OP,
 > unfortunately I still see the same kind of misfontification with the
 > program of mine that prompted my OP.  I haven't had time to investigate
 > further and I'm not sure when I will, but if and when I can provide more
 > information, I'll either reopen this bug or file a new one.
 >
 > Steve Berman

Can you share some code? Either here or by private email?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Feb 2025 14:20:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 06 09:20:20 2025
Received: from localhost ([127.0.0.1]:55016 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tg2jr-0004yW-60
	for submit <at> debbugs.gnu.org; Thu, 06 Feb 2025 09:20:19 -0500
Received: from lists.gnu.org ([2001:470:142::17]:44614)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1tg2jk-0004se-73
 for submit <at> debbugs.gnu.org; Thu, 06 Feb 2025 09:20:13 -0500
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 <geb-bug-gnu-emacs@HIDDEN>)
 id 1tg2jc-00017p-Lg
 for bug-gnu-emacs@HIDDEN; Thu, 06 Feb 2025 09:20:05 -0500
Received: from ciao.gmane.io ([116.202.254.214])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1tg2jb-0004oD-3m
 for bug-gnu-emacs@HIDDEN; Thu, 06 Feb 2025 09:20:04 -0500
Received: from list by ciao.gmane.io with local (Exim 4.92)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1tg2jW-0001pe-SK
 for bug-gnu-emacs@HIDDEN; Thu, 06 Feb 2025 15:19:58 +0100
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Mauro Aranda <maurooaranda@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
Date: Thu, 6 Feb 2025 11:19:53 -0300
Message-ID: <07b99430-265a-40f9-8a83-034fd78b8fe2@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN> <87le3fljk5.fsf@HIDDEN>
 <864ja3d0h5.fsf@HIDDEN> <87cyorldxf.fsf@HIDDEN>
 <add886d6-aecf-4664-be5a-2ccc718458cb@HIDDEN>
 <jwvfrlit6u0.fsf-monnier+emacs@HIDDEN>
 <67b58a2b-7428-4625-b431-d7cbafa0ea52@HIDDEN>
 <jwvh65xsfpn.fsf-monnier+emacs@HIDDEN>
 <f284cdf5-db62-489b-ab9f-d9564cb4583e@HIDDEN> <86h65dg9m3.fsf@HIDDEN>
 <jwva5b4lyew.fsf-monnier+emacs@HIDDEN> <86seos8rlz.fsf@HIDDEN>
 <87pljvnoqm.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <87pljvnoqm.fsf@HIDDEN>
Received-SPF: pass client-ip=116.202.254.214;
 envelope-from=geb-bug-gnu-emacs@HIDDEN; helo=ciao.gmane.io
X-Spam_score_int: 11
X-Spam_score: 1.1
X-Spam_bar: +
X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001,
 FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
 FREEMAIL_REPLY=1, HEADER_FROM_DIFFERENT_DOMAINS=0.07, NML_ADSP_CUSTOM_MED=0.9,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Stephen Berman writes: > On Wed, 05 Feb 2025 15:10:16 +0200
 Eli Zaretskii wrote: > >>> From: Stefan Monnier >>> Cc: Mauro Aranda ,
 stephen.berman@HIDDEN, 
 >>> 69941 <at> debbugs.gnu.org >>> Date: Sun, 02 Feb 2025 18:28:39 [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.0 T_SPF_PERMERROR        SPF: test of record failed (permerror)
 0.1 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
 mail domains are different
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (maurooaranda[at]gmail.com)
 1.0 FORGED_GMAIL_RCVD      'From' gmail.com does not match 'Received'
 headers
 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
 EnvelopeFrom freemail headers are different
 1.0 FREEMAIL_REPLY         From and body contain different freemails
X-Debbugs-Envelope-To: submit
Cc: 69941-done <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.1 (/)

Stephen Berman <stephen.berman@HIDDEN> writes:

 > On Wed, 05 Feb 2025 15:10:16 +0200 Eli Zaretskii <eliz@HIDDEN> wrote:
 >
 >>> From: Stefan Monnier <monnier@HIDDEN>
 >>> Cc: Mauro Aranda <maurooaranda@HIDDEN>,  stephen.berman@HIDDEN,
 >>>   69941 <at> debbugs.gnu.org
 >>> Date: Sun, 02 Feb 2025 18:28:39 -0500
 >>>
 >>> > Stefan, any further comments, or should we install this?
 >>>
 >>> We can install this, AFAIC.
 >>
 >> Thanks, installed on the master branch, and closing the bug.
 >
 > I've only now found time to try Mauro's patch, and while I can confirm
 > that it fixes the example of misfontification I reported in my OP,
 > unfortunately I still see the same kind of misfontification with the
 > program of mine that prompted my OP.  I haven't had time to investigate
 > further and I'm not sure when I will, but if and when I can provide more
 > information, I'll either reopen this bug or file a new one.
 >
 > Steve Berman

Can you share some code? Either here or by private email?






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941-done <at> debbugs.gnu.org:


Received: (at 69941-done) by debbugs.gnu.org; 6 Feb 2025 14:15:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 06 09:15:39 2025
Received: from localhost ([127.0.0.1]:55005 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tg2fL-0003PK-5d
	for submit <at> debbugs.gnu.org; Thu, 06 Feb 2025 09:15:39 -0500
Received: from mout.gmx.net ([212.227.15.18]:37403)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <stephen.berman@HIDDEN>)
 id 1tg2fI-00032u-Ge
 for 69941-done <at> debbugs.gnu.org; Thu, 06 Feb 2025 09:15:37 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1738851330; x=1739456130; i=stephen.berman@HIDDEN;
 bh=lH/zroPMnnTB6eZNROxustu7bmymSLOoGt1BdZYY5zw=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=dveZ0U0LyfRJlbrV4GZs8B974+jGEZHGlQ1r2TyT1vVVnOvj7xbFi7hIRyMLs884
 g0fBx+6kdO/iK3tQKqKOYbu0BfVyQq6ftpgt5qjuCdWTjssOacEqvF7zXAXBoErlh
 EoLFo5d54fXOQeKxgO9Yx+BSQiWLcs9h+W4FZFuqPws3di+WXqfhMgDzChkR2295r
 qNkwBMysoRK32RAfNEohOzZZazYxs7lAZtWGa5ppFrtBq7lzVnb84YjgicRbhlXd9
 g9rbG7MZmaAudlTn9bFO0a4556loQEfR61S6onAnhr4kHbnHx0g0ZyqdyDMeXRRTH
 bmluR/ARvWmeyPm2dw==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfssd ([88.130.48.106]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mirna-1tA1Is0So8-00dD82; Thu, 06
 Feb 2025 15:15:30 +0100
From: Stephen Berman <stephen.berman@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <86seos8rlz.fsf@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN>
 <87le3fljk5.fsf@HIDDEN> <864ja3d0h5.fsf@HIDDEN>
 <87cyorldxf.fsf@HIDDEN>
 <add886d6-aecf-4664-be5a-2ccc718458cb@HIDDEN>
 <jwvfrlit6u0.fsf-monnier+emacs@HIDDEN>
 <67b58a2b-7428-4625-b431-d7cbafa0ea52@HIDDEN>
 <jwvh65xsfpn.fsf-monnier+emacs@HIDDEN>
 <f284cdf5-db62-489b-ab9f-d9564cb4583e@HIDDEN>
 <86h65dg9m3.fsf@HIDDEN> <jwva5b4lyew.fsf-monnier+emacs@HIDDEN>
 <86seos8rlz.fsf@HIDDEN>
Date: Thu, 06 Feb 2025 15:15:29 +0100
Message-ID: <87pljvnoqm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:M7MwrZ/bznkaZ/HebuC/E/zkYrnQnOXznDscoFlOV4rM7jXPFa+
 wu2iX26p+p2AYTCr7AMjPqY3rvVfUuo3ScywlAAJB3hufgq7HEWUZOMwyGgKTMP9txhhwJz
 0bRn7Q2IxGseh4IxDHSkiam5SHIbjumyxS/QoaDpXc0GSYU1O8QeJf0eddctloexox2t4AZ
 xPVnrB5eGcggLUV2DXUdg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:vQCc8QdqjOk=;x3+7mHPcQnY8TnftDMMsoPAPbf3
 OkLdZiJz5qpl0fTX9zd7oodejmsJgXR8YEKn8/Cfwb8Qlmt1hua/krzqgrZfRa4MPC2ncQmiL
 3jH1GpOH0k6bNAcVd23We0pt4ne05AQdciBVLC1TCdhoWakDD6H4gS7qCdpNHdnE+gDuBGbpU
 LsKmRIiHvHMRMRyAVK+cW+ALJZ4I9cb4KKqw7TH7aZ7ZOfOB1f7qRFVk4IrcfOjxa3zJRIucL
 H46f7JqfoehopQvedkeSwyEutcNaNbjo8h9CB90iEL0VIyKxLrnHLC8AKQlKs8JniGswojJ7w
 R1CCnrIjn883hHYWYTfardC+iGrZYmjWmDfao4btzbPJdwYQuLK7VBt8wJOpyb17CPoettFqj
 EH+3QOpAKuoCEjYvpP+28NFO1M/5wrbPYojMH5dXCCUXeTs96LguKVngANprGEnALXuhILvHM
 ppcKcmSL+LpNTx1ztAYEeZ1/bPa2Y1b2Uf+YUOK+uwIkulPSGK2Ip5jtiRBE0xRbz4+KfAymn
 d+AYVzFACYmEuc9Gp+zT5xSJtOVmUUHwtTC/fMXVxy8TuZ9/rjIEV2D6F6Raa9QsQHrF5ra1N
 +h+LUXoXaPitfMFrILWDgmPtAfEhJ+vpy9a37VIg98Alns+pEKeKFU0wKxqW++7kTT9WIekWL
 FVWl+OI8o/TrZLORyz3+jnovdPwfyymhjlgal5cpO0zF4HZoNyHlkf9tYsEm9yKMGBRd2iV2+
 SiCelnspSEo9rJOgcJqhX1neoob+96OyKzhqni2MsUn9YWD8Wp9wE4hE6PhIFJpapG6kHwiBn
 i3fpA87X/zjZwOVGBVYesIUECr1oCXN5RL82nC6I44g5m57B3NyHs0NM1uV6+SM04v3fRZbnb
 drQ6rJ7aIe6cDWwqTPwCcXN7tmHkn8DEhxSilfIb86cjnMLR65BfdhK5zNhglQ5HH7vslG7ON
 7iTA41XMrmy/gjAE9Eysz0n1HBrktYtcauHVpUK5vjKYGCK+CbhtF/jmbbcQE3BrR3mS3zN93
 G3tkCNnDRar/OZ5FHI7A9zXsXK5naeIpDW21C3CN8kjiL/3UISr4fzt+HjH3oGvXuzilVTFbd
 jiXM8IvOkICxRwAuwEZnaj+Vxcz7l+//xhLNVmORTaJroGtKuewJVnPNI1wwW9Qs/wbCHdQWD
 LaBYFf8aLtODYfYMREgIzL8rFy2mIZ9CzlM6By9NNoCXdHqosesle3fnBrNFg1oVxLjaMs0yY
 NkEw55gxm1uZlVLy2rNrFfCZ6ieZWpnGp+dOF1STGZm5q7UdqhYp40PsDMfFlwv2JD3YEg9qG
 CGhIDENoQc9u9AXFb+iXUtidsuemj3QTtcCPn/zi0CqsUILvd6tTJaPZwNcS2rPzfeE09iPpP
 Sspbyhm+ueZQFCbKz9Z75drJTSD2so0NgtwE7Udyv0nFFTMe6wSFQLhp1gtsZcRm5J2itVOaj
 3BctdsA==
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 69941-done
Cc: 69941-done <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
 maurooaranda@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Wed, 05 Feb 2025 15:10:16 +0200 Eli Zaretskii <eliz@HIDDEN> wrote:

>> From: Stefan Monnier <monnier@HIDDEN>
>> Cc: Mauro Aranda <maurooaranda@HIDDEN>,  stephen.berman@HIDDEN,
>>   69941 <at> debbugs.gnu.org
>> Date: Sun, 02 Feb 2025 18:28:39 -0500
>>
>> > Stefan, any further comments, or should we install this?
>>
>> We can install this, AFAIC.
>
> Thanks, installed on the master branch, and closing the bug.

I've only now found time to try Mauro's patch, and while I can confirm
that it fixes the example of misfontification I reported in my OP,
unfortunately I still see the same kind of misfontification with the
program of mine that prompted my OP.  I haven't had time to investigate
further and I'm not sure when I will, but if and when I can provide more
information, I'll either reopen this bug or file a new one.

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941-done <at> debbugs.gnu.org:


Received: (at 69941-done) by debbugs.gnu.org; 5 Feb 2025 13:10:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 05 08:10:49 2025
Received: from localhost ([127.0.0.1]:49044 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tffB3-0001TS-8N
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 08:10:49 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:59868)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tffB0-0001TB-Gv
 for 69941-done <at> debbugs.gnu.org; Wed, 05 Feb 2025 08:10:47 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tffAt-0007oX-EK; Wed, 05 Feb 2025 08:10:40 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=QZ2yNDLq6nMbi2H7dGxMG9kZn30IaLSYKq1Up04tepo=; b=CwgG5mKK0wk6
 k6Tcc5o9CGw4tRyhbSKMzi1mFYok7k5P/H3c3snJ7Im6mkVkNDR/LQAb3IvOK05nXaM1LDTtn5kbH
 2sqNVTDpyBbYe/ci5uhUuCJKQp03UlMrFTEMkBuxmq4Jc3CCeMA+fLNZnrcVScXxteF3Deie9G/wm
 zxfTuSPIEuY3LwTHxUAckmFf38XwgcN7gfWQChjEUqkCycYBTmqHJqxzGudgweBayFTXPLo4pBAhn
 KvJU7stBM3zPAHaWE9W9JA++C1N13gYhZ+7cGKXzfyMImEybFEzdiV7kPhtlmpOed6g5cd+t9RnsR
 /mI7jgHN0Wn0xcwu0BLpYA==;
Date: Wed, 05 Feb 2025 15:10:16 +0200
Message-Id: <86seos8rlz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwva5b4lyew.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Sun, 02 Feb 2025 18:28:39 -0500)
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN>
 <87le3fljk5.fsf@HIDDEN> <864ja3d0h5.fsf@HIDDEN>
 <87cyorldxf.fsf@HIDDEN>
 <add886d6-aecf-4664-be5a-2ccc718458cb@HIDDEN>
 <jwvfrlit6u0.fsf-monnier+emacs@HIDDEN>
 <67b58a2b-7428-4625-b431-d7cbafa0ea52@HIDDEN>
 <jwvh65xsfpn.fsf-monnier+emacs@HIDDEN>
 <f284cdf5-db62-489b-ab9f-d9564cb4583e@HIDDEN>
 <86h65dg9m3.fsf@HIDDEN> <jwva5b4lyew.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941-done
Cc: 69941-done <at> debbugs.gnu.org, stephen.berman@HIDDEN, maurooaranda@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: Mauro Aranda <maurooaranda@HIDDEN>,  stephen.berman@HIDDEN,
>   69941 <at> debbugs.gnu.org
> Date: Sun, 02 Feb 2025 18:28:39 -0500
> 
> > Stefan, any further comments, or should we install this?
> 
> We can install this, AFAIC.

Thanks, installed on the master branch, and closing the bug.




Notification sent to Stephen Berman <stephen.berman@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Eli Zaretskii <eliz@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 2 Feb 2025 23:28:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 02 18:28:52 2025
Received: from localhost ([127.0.0.1]:36709 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tejOW-0004uj-Ew
	for submit <at> debbugs.gnu.org; Sun, 02 Feb 2025 18:28:52 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:57595)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1tejOV-0004uU-3H
 for 69941 <at> debbugs.gnu.org; Sun, 02 Feb 2025 18:28:51 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 355F4100182;
 Sun,  2 Feb 2025 18:28:45 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1738538920;
 bh=64NErzFxeRb4Ms2f0MkfI/PiXncTa0YWT6sfjAuuPng=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=JO5mggxRYHvVIusbdDKZzZc+Y2/EziBcRQeHUJNneolkHjCGwDuBT34BHRdMDSKlK
 VB3L00SFLIy3j08x/6DCGs7zYy8z9VQUyEIHpv4AYnragSbBMD7ByuxGIGjJtq6fXP
 FUdC/1HslKE2AdDK03TrW62u1Eg2Mhc0wjjxSC5+dMIelPoaZTCqwx1rtW1Epe7/eQ
 6Z6JjtezEatcCl3tBDePxSesD6/OBrepkDl3rVLwiwERzAUeJkJ/RcCYoxow7pgTPj
 6AfUKpzKItpzLtAV0HYMzKjAyJix7QlqUXxOVxwDSgj3AZkTeXDHuwaR7HqS4ojBCA
 5z2dT7CLA6BBA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2ACD0100128;
 Sun,  2 Feb 2025 18:28:40 -0500 (EST)
Received: from alfajor (104-195-232-86.cpe.teksavvy.com [104.195.232.86])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DC28A12021A;
 Sun,  2 Feb 2025 18:28:39 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <86h65dg9m3.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 01 Feb
 2025 13:58:12 +0200")
Message-ID: <jwva5b4lyew.fsf-monnier+emacs@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN>
 <87le3fljk5.fsf@HIDDEN> <864ja3d0h5.fsf@HIDDEN>
 <87cyorldxf.fsf@HIDDEN>
 <add886d6-aecf-4664-be5a-2ccc718458cb@HIDDEN>
 <jwvfrlit6u0.fsf-monnier+emacs@HIDDEN>
 <67b58a2b-7428-4625-b431-d7cbafa0ea52@HIDDEN>
 <jwvh65xsfpn.fsf-monnier+emacs@HIDDEN>
 <f284cdf5-db62-489b-ab9f-d9564cb4583e@HIDDEN>
 <86h65dg9m3.fsf@HIDDEN>
Date: Sun, 02 Feb 2025 18:28:39 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.075 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, stephen.berman@HIDDEN,
 Mauro Aranda <maurooaranda@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Stefan, any further comments, or should we install this?

We can install this, AFAIC.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 1 Feb 2025 11:58:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 01 06:58:26 2025
Received: from localhost ([127.0.0.1]:56804 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1teC8n-0005hl-Op
	for submit <at> debbugs.gnu.org; Sat, 01 Feb 2025 06:58:26 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:54120)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1teC8m-0005hV-6l
 for 69941 <at> debbugs.gnu.org; Sat, 01 Feb 2025 06:58:24 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1teC8g-0007LV-R4; Sat, 01 Feb 2025 06:58:18 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=9E+VBYleKUUcXMmo8jL9+aisKxKow3E+XoIKr6Q56/U=; b=h3+aMfNlFox5FihcFAn5
 zpj7105iYYfbOcof6sDXMqiXyllPgGvAQnGID01nKkQ5QDyBMGYU50gjI+UJIEs1j8wXbE18WWEyy
 HZ4BSk1Vhasg9S9gz9zC5zko6HkHrB0uytPtokhZGbyMmJ6h9NOXRlGOkX2IALas/l6qQuwYAjBYD
 0j9lUOX1bhAEZwbrCKajA+uMVPCphkcTfjNqe0sDrLPlVJM+I5Xmd9PCLhTyjhtEnCCZDqconY2Rm
 n6lSEwfx4UzM0jNHGkXBETY92E/cc85S84Ne+nseRiyxaNZ+7ZJY8C12d4VxUzLdwvDfGjHB/ufp/
 /2w2jVsiGfUy0Q==;
Date: Sat, 01 Feb 2025 13:58:12 +0200
Message-Id: <86h65dg9m3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: monnier@HIDDEN, Mauro Aranda <maurooaranda@HIDDEN>
In-Reply-To: <f284cdf5-db62-489b-ab9f-d9564cb4583e@HIDDEN> (message from
 Mauro Aranda on Fri, 17 Jan 2025 17:13:07 -0300)
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN> <87le3fljk5.fsf@HIDDEN>
 <864ja3d0h5.fsf@HIDDEN> <87cyorldxf.fsf@HIDDEN>
 <add886d6-aecf-4664-be5a-2ccc718458cb@HIDDEN>
 <jwvfrlit6u0.fsf-monnier+emacs@HIDDEN>
 <67b58a2b-7428-4625-b431-d7cbafa0ea52@HIDDEN>
 <jwvh65xsfpn.fsf-monnier+emacs@HIDDEN>
 <f284cdf5-db62-489b-ab9f-d9564cb4583e@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, stephen.berman@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Fri, 17 Jan 2025 17:13:07 -0300
> Cc: Stephen Berman <stephen.berman@HIDDEN>, 69941 <at> debbugs.gnu.org,
>  Eli Zaretskii <eliz@HIDDEN>
> From: Mauro Aranda <maurooaranda@HIDDEN>
> 
> Stefan Monnier <monnier@HIDDEN> writes:
> 
>  >> I attach a patch that implements something like that, along with a new
>  >> test to check the recursive case.
>  >
>  > Great.  A few more comments:
>  >
>  >> +  (let* ((parent (widget-get widget :parent))
>  >> +         (parent-from-marker (and parent (widget-get parent :from)))
>  >> +         (parent-to-marker (and parent (widget-get parent :to)))
>  >> +         (continue nil)
>  >> +         (lst nil)
>  >> +         (pos (point)))
>  >> +    (when (and parent-from-marker
>  >> +               (eq pos (marker-position parent-from-marker)))
>  >> +      (set-marker-insertion-type parent-from-marker nil)
>  >> +      (push (cons parent-from-marker t) lst)
>  >> +      (setq continue t))
>  >> +    (when (and parent-to-marker
>  >> +               (eq pos (marker-position parent-to-marker)))
>  >> +      (set-marker-insertion-type parent-to-marker t)
>  >> +      (push (cons parent-to-marker nil) lst)
>  >> +      (setq continue t))
>  >> +    (when continue
>  >> +      (setq lst
>  >> + (append lst (widget--prepare-markers-for-inside-insertion
>  >> parent))))
>  >> +    lst))
>  >
>  > It just occurred to me that if widget updates happen recursively
>  > (meaning that another widget update happens between the two calls to
>  > `widget--prepare-markers-for-*-insertion`), then the
>  > `widget--prepare-markers-for-outside-insertion` done at the end
>  > of the inner call will mean that any insertion that happens afterwards
>  > can end up inserting "outside" instead of "inside".  So, I think to
>  > protect against that, we need the above code to push only those markers
>  > which we do change (i.e. we need to test the current value of
>  > `marker-insertion-type` before pushing it to `lst`).
>  > Does that make sense, or am I imagining things?
>  >
> 
> I think I get what you mean.  It makes sense, although I couldn't figure
> out a precise scenario where this might actually happen.  I'll try to
> explain:
> 
> Recursive updates happen anytime we are creating a composite
> widget, and I think the situation you describe could potentially happen
> when we are recreating a composite widget that's inside another
> composite widget and that should be common enough to worry about it.
> 
> So we have: composite-widget > composite-widget2 > children.
> 
> If we're recreating the 'composite-widget2', then it will have markers
> pointing nowhere (because of the deletion that happens first in
> `widget-default-value-set`).  So the code will prepare the markers of
> 'composite-widget', but when `widget-default-create` gets called for
> creating 'children', `widget--prepare-markers-for-inside-insertion` will
> return an empty list, effectively avoiding the scenario you though
> about, IIUC.
> 
> Nevertheless, since my imagination can only go so far, and because it's
> quite easy to add those checks, I implemented that in the attached
> patch.
> 
>  > PS: While I'm here, I might as well mention the irrelevant tweaks
>  >   I'd be tempted to do:
>  >
>  > - Maybe instead of "prepare" I'd use "revert" in the name of the
>  >   second function.
>  > - `continue` is non-nil exactly when `lst` is non-nil, so we can drop
>  >   `continue`.
>  > - Since `lst` is a freshly consructed list, we can use `nconc`.
>  > - The `setq` at the end is right before returning `lst`
>  >   so we don't need it, instead we can finish with:
>  >
>  >     (when lst
>  >       (nconc lst (widget--prepare-markers-for-inside-insertion 
> parent)))))
> 
> These are most welcome, thanks.  New patch attached.

Stefan, any further comments, or should we install this?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 17 Jan 2025 20:13:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 17 15:13:22 2025
Received: from localhost ([127.0.0.1]:38918 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tYsiX-0004MW-T1
	for submit <at> debbugs.gnu.org; Fri, 17 Jan 2025 15:13:22 -0500
Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:51499)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maurooaranda@HIDDEN>)
 id 1tYsiT-0004MD-Jd
 for 69941 <at> debbugs.gnu.org; Fri, 17 Jan 2025 15:13:19 -0500
Received: by mail-pj1-x1032.google.com with SMTP id
 98e67ed59e1d1-2ee709715d9so3674881a91.3
 for <69941 <at> debbugs.gnu.org>; Fri, 17 Jan 2025 12:13:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1737144791; x=1737749591; darn=debbugs.gnu.org;
 h=in-reply-to:from:content-language:references:cc:to:subject
 :user-agent:mime-version:date:message-id:from:to:cc:subject:date
 :message-id:reply-to;
 bh=M33CzgAgqlThtxgxUBbL1a5AkqD1hMtIbn+kf9nttik=;
 b=WBq2MyJUEWEJDSM6XTYHg/FoylrwYWUweCLd9Mx2sfIrUCJXad0S0YQJc8UwxqGmjz
 v0oQk4EQOqjsUv7lABIdE/aKT9H0xg2Yxw0+IlRzFoXcpMeKJVQ1MDopWBAav+KiJE3d
 DJHmzvd5O4aNHpAfpqnH7AbNunEIO67PotW57Sd9fWo0IqX+RE3JHL3J5i8U1/HwIqpm
 GHUqg/JHr/tI3ah6dsg10RwJ1/BQOUGHp/aHgHDh7DzlsdzY6VPgI+jV7xdJAnULD0kz
 ytE1m/fJn7moH8JvpxilZgqv6Sx5m2rA53V2AtOQDkFZNyDrrL616744FmnDbWH6GKpi
 dlpw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1737144791; x=1737749591;
 h=in-reply-to:from:content-language:references:cc:to:subject
 :user-agent:mime-version:date:message-id:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=M33CzgAgqlThtxgxUBbL1a5AkqD1hMtIbn+kf9nttik=;
 b=Lnb2GxDtTsSTry2JQWPlwin0LKeE6vuVxebLfsacmV1Y0L2ILrBVVuuBEU6eHISmSo
 v0Hpz3mzjkffwipuwtfWwI5wX7JoMxUaMaHAFnHDe41QdDEUdsnysn/+chG8oLATiGke
 pr1+9Gc3lQAm2yb5Cny+jfxR/HEQwnTw/HJNCBMyTCJJw245V6+s8TooFFgIGVuTi3U7
 Ug3vKXogISplFY00NDjkH0AxQshQKdlUZZq2Kq36lgRKsa5gIkX8OGlEtU6K5Cbo+wEb
 bvFeXIYR74aQTQIyMncvWFdzSMWb0T0raOBx2gz9J9ZLRYH9U2WCUaFOBaRa3GbrqR29
 QMnQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCXEehZsrY8WuBApuML6zxfsWfeWsbfrfhc+mz9m3LQ257pqSeiLlPgHDaXUdGB+73ACtK7vMQ==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yz2oP1rmBFVBkDCId9g6Mc8vW0fOLAwK8F1NWGDBQzPZUxtmu0M
 EOtoDv7zCeli46IU/l78VVASV/YJXbRZ0c2mPa04wW77pjREq8tJ
X-Gm-Gg: ASbGnct3C0NKWhIbH0qB5qmQITjhjETtITlMrzTiaZ0e6LoiJnOHCh+cMSMDp58r9BL
 8gn7MT+AUFg3OdeH0qq+/b9LvFOx/h+Y9NH+cVA0rih3AiupJnGdhyRyRoQLLvRVtD4//2cycul
 jPV0VO2ERKONn54uqSYB+LYyoDG6WBqA0iHnTiuYGaY8xG4K5Qp/66zSU4aqp6atWt5+dqCd2J8
 yOC5FZqYT7mMPFkZVC53WTX6YZVRqGGQ3Bl4acqcOtzzTSzZ3TF0529bQ2uSbQ=
X-Google-Smtp-Source: AGHT+IHYMdjefVAJJN1jbsc8wQfBD4aMG6CHJs7QU8aDigPPp1wIEUGNFrVD0mhOILbPRoQLwdBAVA==
X-Received: by 2002:a17:90b:534b:b0:2f6:f107:fae6 with SMTP id
 98e67ed59e1d1-2f782d32397mr4780791a91.23.1737144791291; 
 Fri, 17 Jan 2025 12:13:11 -0800 (PST)
Received: from [192.168.0.234] ([181.228.33.6])
 by smtp.gmail.com with ESMTPSA id
 98e67ed59e1d1-2f72c1ccf46sm5745964a91.22.2025.01.17.12.13.08
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 17 Jan 2025 12:13:10 -0800 (PST)
Content-Type: multipart/mixed; boundary="------------3VPoN0opVyt6PDGLI8ssPmDW"
Message-ID: <f284cdf5-db62-489b-ab9f-d9564cb4583e@HIDDEN>
Date: Fri, 17 Jan 2025 17:13:07 -0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
To: Stefan Monnier <monnier@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN> <87le3fljk5.fsf@HIDDEN>
 <864ja3d0h5.fsf@HIDDEN> <87cyorldxf.fsf@HIDDEN>
 <add886d6-aecf-4664-be5a-2ccc718458cb@HIDDEN>
 <jwvfrlit6u0.fsf-monnier+emacs@HIDDEN>
 <67b58a2b-7428-4625-b431-d7cbafa0ea52@HIDDEN>
 <jwvh65xsfpn.fsf-monnier+emacs@HIDDEN>
Content-Language: en-US
From: Mauro Aranda <maurooaranda@HIDDEN>
In-Reply-To: <jwvh65xsfpn.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, Stephen Berman <stephen.berman@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------3VPoN0opVyt6PDGLI8ssPmDW
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Stefan Monnier <monnier@HIDDEN> writes:

 >> I attach a patch that implements something like that, along with a new
 >> test to check the recursive case.
 >
 > Great.  A few more comments:
 >
 >> +  (let* ((parent (widget-get widget :parent))
 >> +         (parent-from-marker (and parent (widget-get parent :from)))
 >> +         (parent-to-marker (and parent (widget-get parent :to)))
 >> +         (continue nil)
 >> +         (lst nil)
 >> +         (pos (point)))
 >> +    (when (and parent-from-marker
 >> +               (eq pos (marker-position parent-from-marker)))
 >> +      (set-marker-insertion-type parent-from-marker nil)
 >> +      (push (cons parent-from-marker t) lst)
 >> +      (setq continue t))
 >> +    (when (and parent-to-marker
 >> +               (eq pos (marker-position parent-to-marker)))
 >> +      (set-marker-insertion-type parent-to-marker t)
 >> +      (push (cons parent-to-marker nil) lst)
 >> +      (setq continue t))
 >> +    (when continue
 >> +      (setq lst
 >> + (append lst (widget--prepare-markers-for-inside-insertion
 >> parent))))
 >> +    lst))
 >
 > It just occurred to me that if widget updates happen recursively
 > (meaning that another widget update happens between the two calls to
 > `widget--prepare-markers-for-*-insertion`), then the
 > `widget--prepare-markers-for-outside-insertion` done at the end
 > of the inner call will mean that any insertion that happens afterwards
 > can end up inserting "outside" instead of "inside".  So, I think to
 > protect against that, we need the above code to push only those markers
 > which we do change (i.e. we need to test the current value of
 > `marker-insertion-type` before pushing it to `lst`).
 > Does that make sense, or am I imagining things?
 >

I think I get what you mean.  It makes sense, although I couldn't figure
out a precise scenario where this might actually happen.  I'll try to
explain:

Recursive updates happen anytime we are creating a composite
widget, and I think the situation you describe could potentially happen
when we are recreating a composite widget that's inside another
composite widget and that should be common enough to worry about it.

So we have: composite-widget > composite-widget2 > children.

If we're recreating the 'composite-widget2', then it will have markers
pointing nowhere (because of the deletion that happens first in
`widget-default-value-set`).  So the code will prepare the markers of
'composite-widget', but when `widget-default-create` gets called for
creating 'children', `widget--prepare-markers-for-inside-insertion` will
return an empty list, effectively avoiding the scenario you though
about, IIUC.

Nevertheless, since my imagination can only go so far, and because it's
quite easy to add those checks, I implemented that in the attached
patch.

 > PS: While I'm here, I might as well mention the irrelevant tweaks
 >   I'd be tempted to do:
 >
 > - Maybe instead of "prepare" I'd use "revert" in the name of the
 >   second function.
 > - `continue` is non-nil exactly when `lst` is non-nil, so we can drop
 >   `continue`.
 > - Since `lst` is a freshly consructed list, we can use `nconc`.
 > - The `setq` at the end is right before returning `lst`
 >   so we don't need it, instead we can finish with:
 >
 >     (when lst
 >       (nconc lst (widget--prepare-markers-for-inside-insertion 
parent)))))

These are most welcome, thanks.  New patch attached.

--------------3VPoN0opVyt6PDGLI8ssPmDW
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Prepare-markers-for-insertions-inside-of-a-widget.patch"
Content-Disposition: attachment;
 filename*0="0001-Prepare-markers-for-insertions-inside-of-a-widget.patch"
Content-Transfer-Encoding: base64

RnJvbSBjZjBhZGJkZjBkYjliNjhkNTMxZGY5YTY3NzE3YmZkZjFhNzU1NGJhIE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBNYXVybyBBcmFuZGEgPG1hdXJvb2FyYW5kYUBnbWFp
bC5jb20+CkRhdGU6IEZyaSwgMTcgSmFuIDIwMjUgMTc6MTI6MDggLTAzMDAKU3ViamVjdDog
W1BBVENIXSBQcmVwYXJlIG1hcmtlcnMgZm9yIGluc2VydGlvbnMgaW5zaWRlIG9mIGEgd2lk
Z2V0CgpSZWNyZWF0aW5nIGNoaWxkIHdpZGdldHMgd2l0aG91dCByZWNyZWF0aW5nIHRoZSBw
YXJlbnQgd2lkZ2V0Cm1heSBsZWFkIHRvIHNpdHVhdGlvbnMgd2hlcmUgdGhlIHBhcmVudCB3
aWRnZXQgZG9lc24ndCBjb3ZlciBpdHMKY2hpbGRyZW4gb3IgYnV0dG9ucyBlbnRpcmVseSBh
bnltb3JlLiA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ICAgICAgICAocGFyZW50LXRvLW1hcmtlciAo
YW5kIHBhcmVudCAod2lkZ2V0LWdldCBwYXJlbnQgOnRvKSkpCisgICAgICAgICAobHN0IG5p
bCkKKyAgICAgICAgIChwb3MgKHBvaW50KSkpCisgICAgKHdoZW4gKGFuZCBwYXJlbnQtZnJv
bS1tYXJrZXIKKyAgICAgICAgICAgICAgIChlcSBwb3MgKG1hcmtlci1wb3NpdGlvbiBwYXJl
bnQtZnJvbS1tYXJrZXIpKQorICAgICAgICAgICAgICAgKG1hcmtlci1pbnNlcnRpb24tdHlw
ZSBwYXJlbnQtZnJvbS1tYXJrZXIpKQorICAgICAgKHNldC1tYXJrZXItaW5zZXJ0aW9uLXR5
cGUgcGFyZW50LWZyb20tbWFya2VyIG5pbCkKKyAgICAgIChwdXNoIChjb25zIHBhcmVudC1m
cm9tLW1hcmtlciB0KSBsc3QpKQorICAgICh3aGVuIChhbmQgcGFyZW50LXRvLW1hcmtlcgor
ICAgICAgICAgICAgICAgKGVxIHBvcyAobWFya2VyLXBvc2l0aW9uIHBhcmVudC10by1tYXJr
ZXIpKQorICAgICAgICAgICAgICAgKG5vdCAobWFya2VyLWluc2VydGlvbi10eXBlIHBhcmVu
dC10by1tYXJrZXIpKSkKKyAgICAgIChzZXQtbWFya2VyLWluc2VydGlvbi10eXBlIHBhcmVu
dC10by1tYXJrZXIgdCkKKyAgICAgIChwdXNoIChjb25zIHBhcmVudC10by1tYXJrZXIgbmls
KSBsc3QpKQorICAgICh3aGVuIGxzdAorICAgICAgKG5jb25jIGxzdCAod2lkZ2V0LS1wcmVw
YXJlLW1hcmtlcnMtZm9yLWluc2lkZS1pbnNlcnRpb24gcGFyZW50KSkpKSkKKworKGRlZnVu
IHdpZGdldC0tcmV2ZXJ0LW1hcmtlcnMtZm9yLW91dHNpZGUtaW5zZXJ0aW9uIChtYXJrZXJz
KQorICAiUmV2ZXJ0IE1BUktFUlMgZm9yIGluc2VydGlvbnMgdGhhdCBkbyBub3QgYmVsb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IgorICAod2l0aC10
ZW1wLWJ1ZmZlcgorICAgIChsZXQqICgoZ3JvdXAgKHdpZGdldC1jcmVhdGUgJyhncm91cAor
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6Zm9ybWF0ICIldiIKKyAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGdyb3VwCisgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICA6Zm9ybWF0ICIldiIKKyAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgIChpdGVtIDp2YWx1ZSAxIDpmb3JtYXQgIiV2IikpKSkpCisgICAg
ICAgICAgIChncm91cDIgKGNhciAod2lkZ2V0LWdldCBncm91cCA6Y2hpbGRyZW4pKSkKKyAg
ICAgICAgICAgKGl0ZW0gKGNhciAod2lkZ2V0LWdldCBncm91cDIgOmNoaWxkcmVuKSkpCisg
ICAgICAgICAgIChvZnJvbSAobWFya2VyLXBvc2l0aW9uICh3aWRnZXQtZ2V0IGdyb3VwIDpm
cm9tKSkpCisgICAgICAgICAgIChvdG8gKG1hcmtlci1wb3NpdGlvbiAod2lkZ2V0LWdldCBn
cm91cCA6dG8pKSkKKyAgICAgICAgICAgKG9mcm9tMiAobWFya2VyLXBvc2l0aW9uICh3aWRn
ZXQtZ2V0IGdyb3VwMiA6ZnJvbSkpKQorICAgICAgICAgICAob3RvMiAobWFya2VyLXBvc2l0
aW9uICh3aWRnZXQtZ2V0IGdyb3VwMiA6dG8pKSkpCisgICAgICAod2lkZ2V0LWluc2VydCAi
XG4iKQorICAgICAgKHdpZGdldC1zZXR1cCkKKyAgICAgICh3aWRnZXQtdmFsdWUtc2V0IGl0
ZW0gMikKKyAgICAgIChzaG91bGQgKD0gb2Zyb20gKHdpZGdldC1nZXQgZ3JvdXAgOmZyb20p
KSkKKyAgICAgIChzaG91bGQgKD0gb3RvICh3aWRnZXQtZ2V0IGdyb3VwIDp0bykpKQorICAg
ICAgKHNob3VsZCAoPSBvZnJvbTIgKHdpZGdldC1nZXQgZ3JvdXAyIDpmcm9tKSkpCisgICAg
ICAoc2hvdWxkICg9IG90bzIgKHdpZGdldC1nZXQgZ3JvdXAyIDp0bykpKSkpKQorCiA7Ozsg
d2lkLWVkaXQtdGVzdHMuZWwgZW5kcyBoZXJlCi0tIAoyLjM0LjEKCg==

--------------3VPoN0opVyt6PDGLI8ssPmDW--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 17 Jan 2025 14:13:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 17 09:13:00 2025
Received: from localhost ([127.0.0.1]:36485 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tYn5n-00075x-Qf
	for submit <at> debbugs.gnu.org; Fri, 17 Jan 2025 09:13:00 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54794)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1tYn5k-00075g-0l
 for 69941 <at> debbugs.gnu.org; Fri, 17 Jan 2025 09:12:56 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4997B4415FA;
 Fri, 17 Jan 2025 09:12:50 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1737123168;
 bh=60h+JRSuRtz/6fVB+l5ot0Y29BB8tlBbEcrU6veu33E=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=mHpIrBSz1Nay0AXHva796NtH3e8hqW/jn/+VcUw4rW7dWIT7XwtLV27yjAC/r4eZx
 8I81FCsGrKfVtUGyWKBhgLzlnsxPzh3wg+DB8evkyjpHUEt6lM1D+avwPklHgP66ir
 4eV1R1kUX/PfyoaJnb/aBKtZebnUski9QsJfioOAGvsAlqSOeBAs35LyPjn3u2+pSV
 mnbi2jky7m4FRBnMzen4+MAsmfoh+Ur2k+xMSLE0on6xKsj0JeNZNNwK+715F7ZJQf
 3XGtuG4bdd69f7+g69ceK4yGl1JubC4YOkIYnpk05LubTitr1PkwGa1Kk37xQTTOJZ
 SnKKc3Z7jmirQ==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CDC964415CC;
 Fri, 17 Jan 2025 09:12:48 -0500 (EST)
Received: from pastel (104-195-232-86.cpe.teksavvy.com [104.195.232.86])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9A77F12026C;
 Fri, 17 Jan 2025 09:12:48 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Mauro Aranda <maurooaranda@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <67b58a2b-7428-4625-b431-d7cbafa0ea52@HIDDEN> (Mauro Aranda's
 message of "Fri, 17 Jan 2025 08:52:29 -0300")
Message-ID: <jwvh65xsfpn.fsf-monnier+emacs@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN>
 <87le3fljk5.fsf@HIDDEN> <864ja3d0h5.fsf@HIDDEN>
 <87cyorldxf.fsf@HIDDEN>
 <add886d6-aecf-4664-be5a-2ccc718458cb@HIDDEN>
 <jwvfrlit6u0.fsf-monnier+emacs@HIDDEN>
 <67b58a2b-7428-4625-b431-d7cbafa0ea52@HIDDEN>
Date: Fri, 17 Jan 2025 09:12:46 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.003 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, Stephen Berman <stephen.berman@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> I attach a patch that implements something like that, along with a new
> test to check the recursive case.

Great.  A few more comments:

> +  (let* ((parent (widget-get widget :parent))
> +         (parent-from-marker (and parent (widget-get parent :from)))
> +         (parent-to-marker (and parent (widget-get parent :to)))
> +         (continue nil)
> +         (lst nil)
> +         (pos (point)))
> +    (when (and parent-from-marker
> +               (eq pos (marker-position parent-from-marker)))
> +      (set-marker-insertion-type parent-from-marker nil)
> +      (push (cons parent-from-marker t) lst)
> +      (setq continue t))
> +    (when (and parent-to-marker
> +               (eq pos (marker-position parent-to-marker)))
> +      (set-marker-insertion-type parent-to-marker t)
> +      (push (cons parent-to-marker nil) lst)
> +      (setq continue t))
> +    (when continue
> +      (setq lst
> +            (append lst (widget--prepare-markers-for-inside-insertion parent))))
> +    lst))

It just occurred to me that if widget updates happen recursively
(meaning that another widget update happens between the two calls to
`widget--prepare-markers-for-*-insertion`), then the
`widget--prepare-markers-for-outside-insertion` done at the end
of the inner call will mean that any insertion that happens afterwards
can end up inserting "outside" instead of "inside".  So, I think to
protect against that, we need the above code to push only those markers
which we do change (i.e. we need to test the current value of
`marker-insertion-type` before pushing it to `lst`).
Does that make sense, or am I imagining things?


        Stefan


PS: While I'm here, I might as well mention the irrelevant tweaks
  I'd be tempted to do:

- Maybe instead of "prepare" I'd use "revert" in the name of the
  second function.
- `continue` is non-nil exactly when `lst` is non-nil, so we can drop
  `continue`.
- Since `lst` is a freshly consructed list, we can use `nconc`.
- The `setq` at the end is right before returning `lst`
  so we don't need it, instead we can finish with:

    (when lst
      (nconc lst (widget--prepare-markers-for-inside-insertion parent)))))





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 17 Jan 2025 11:52:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 17 06:52:45 2025
Received: from localhost ([127.0.0.1]:36212 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tYku4-0005Sz-Sl
	for submit <at> debbugs.gnu.org; Fri, 17 Jan 2025 06:52:45 -0500
Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:60571)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maurooaranda@HIDDEN>)
 id 1tYku0-0005Sh-5E
 for 69941 <at> debbugs.gnu.org; Fri, 17 Jan 2025 06:52:41 -0500
Received: by mail-pl1-x631.google.com with SMTP id
 d9443c01a7336-216728b1836so34148885ad.0
 for <69941 <at> debbugs.gnu.org>; Fri, 17 Jan 2025 03:52:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1737114754; x=1737719554; darn=debbugs.gnu.org;
 h=in-reply-to:from:content-language:references:cc:to:subject
 :user-agent:mime-version:date:message-id:from:to:cc:subject:date
 :message-id:reply-to;
 bh=LG4iNQrejDR+CsIMH8SHnKy7lPKWD+5/IltCBKrY2kc=;
 b=ahQ/0MlROB+Mhkg/Rast37BIYRH1SzNUJODzr4wjXfNiinvBPNu3M2alF6TwcWN4zZ
 3vMAMdhYMQUEBA0T1XMAMQR1DwGLfSaBak+ozmyySgA7J3cfThmgvJbN5Nc8LplAGKRt
 CPtL6YTxr3akZivUl8ATs1wgkUOzcf5Q3pGoD1eMGpGrnpx5te8qdzWSKa8gZSORQksq
 ay/8WZ8aDO+3gNCtjcmjAEy389ZLN+yV/kMP/yg3VvcOLb0cBSL7ghEOojDWK18NIdxe
 rTegsqQO9HeDLmYUB0LP3QboB4/qNIFaDIMwOVJl5kM5GqRFmnoEvfCItcmw9Ll6Nwgy
 aKQw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1737114754; x=1737719554;
 h=in-reply-to:from:content-language:references:cc:to:subject
 :user-agent:mime-version:date:message-id:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=LG4iNQrejDR+CsIMH8SHnKy7lPKWD+5/IltCBKrY2kc=;
 b=sJwQqEmLV993/0PCI47frR43pTXzC5tfvVDCAoUfK4TaZP+z1NdYUzFzU9ty2dCrh+
 gB+huURg0RhuAWbtcITRNeyaU6mhKViDJcb2vZY4339ecMbP0dsJQmSNi2B9ptUOQpQv
 8eRJcPKy7GjCaM2bbhF9dzZtOybRdFwccIDHYbYDJ+z8d9NK0hLfcuP/YjjyoA9q/Sle
 w/33pHhXVjSXjH0NXZKSj7K/fALCNX3MoxLBJjdqDFpPl5HkYs5O8S/uf1dPvPhq7tci
 g97v8r4LlJUzIFH3BaL9IRYFkb30RClkBA3iYMBo0QTh7az6794lgZzkLcUD9yXRRa7n
 0/Tg==
X-Forwarded-Encrypted: i=1;
 AJvYcCWs/ExZZ/bq1NTf8n1PbcvB/0uZU+Dv1nkeRoo12TKcZM7pPfJdeLF6kJbsqiPXvOLXrhPHNw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yx8zEO2kouaxZTCXy1uMw0K3qqhfM4tgvBx3gbb3f9xvdVBE9yr
 l3bP6jE7f/0Ndb4mwF9tUHONzItlC85BjCNDX1nlrAgvKp7mVhvt
X-Gm-Gg: ASbGncuUdWm6E/x5klTUB5fk2UQnbqiXeurjKadz4c5+JCWWIJtkVMJgJE/Ta+CjSxw
 t1EUX4GVwzotYVQga7jhmRaCMPexQEG8j/HSuZ8oPgwXvlLESb1MpBlvszEq0lEeXS3+pdf2z1m
 OzlD5OmlAaF11Ci9+0BWLZzs43pOfJ+iMzrAgTO7qveO8x78WBCfEy8i9PpuZgAZTVJlHg0kUYY
 wuvhbx5notCb+d/kh3fiD9PKZqbr1RSCxugoDG2xFRfk9fhQvk+AJe0P7gPXUM=
X-Google-Smtp-Source: AGHT+IGFdv58tKRun2Fqw5cs+hRppRSmVaPvLXFOE/A6ZvOu5k6McA8+owcD+xhfKI3thOl6XIaigg==
X-Received: by 2002:a05:6a20:6a1e:b0:1e1:b224:74c0 with SMTP id
 adf61e73a8af0-1eb215ec050mr3624210637.38.1737114753744; 
 Fri, 17 Jan 2025 03:52:33 -0800 (PST)
Received: from [192.168.0.234] ([181.228.33.6])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-72dab7f069esm1678909b3a.28.2025.01.17.03.52.31
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 17 Jan 2025 03:52:32 -0800 (PST)
Content-Type: multipart/mixed; boundary="------------Lt9j0hEEI7Uv6NkKb0vRJRNq"
Message-ID: <67b58a2b-7428-4625-b431-d7cbafa0ea52@HIDDEN>
Date: Fri, 17 Jan 2025 08:52:29 -0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
To: Stefan Monnier <monnier@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN> <87le3fljk5.fsf@HIDDEN>
 <864ja3d0h5.fsf@HIDDEN> <87cyorldxf.fsf@HIDDEN>
 <add886d6-aecf-4664-be5a-2ccc718458cb@HIDDEN>
 <jwvfrlit6u0.fsf-monnier+emacs@HIDDEN>
Content-Language: en-US
From: Mauro Aranda <maurooaranda@HIDDEN>
In-Reply-To: <jwvfrlit6u0.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, Stephen Berman <stephen.berman@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------Lt9j0hEEI7Uv6NkKb0vRJRNq
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Stefan Monnier <monnier@HIDDEN> writes:

 >> I attach a patch with a first idea (based on Stefan's suggestions),
 >> where we "protect" the parent's markers, inside widget-default-create.
 >> This is so we can try to catch almost all situations where this bug
 >> might arise.
 >
 > I can't judge whether `widget-default-create` covers all the cases, but
 > other than that, it's looking good (well, I find this "set and later 
reset"
 > to be rather ugly/brittle, but that's probably as good as it gets given
 > what we have).

Thanks for taking a look.

 >> +(defun widget--protect-parent-markers (widget)
 >> +  "Protect the :from and :to markers of the WIDGET's parent, if 
necessary.
 >> +
 >> +Usually, the :from marker has type t, while the :to marker has type 
nil.
 >> +When creating a child or a button inside a composite widget, they 
have to be
 >> +changed to nil and t respectively, so that the WIDGET's parent (if 
any),
 >> +properly contains all of its children and buttons."
 >> +  (let* ((parent (widget-get widget :parent))
 >> +         (parent-from-marker (and parent (widget-get parent :from)))
 >> +         (parent-to-marker (and parent (widget-get parent :to)))
 >> +         (pos (point)))
 >> +    (when (and parent-from-marker
 >> +               (eq pos (marker-position parent-from-marker)))
 >> +      (set-marker-insertion-type parent-from-marker nil))
 >> +    (when (and parent-to-marker
 >> +               (eq pos (marker-position parent-to-marker)))
 >> +      (set-marker-insertion-type parent-to-marker t))))
 >> +
 >> +(defun widget--unprotect-parent-markers (widget)
 >> +  "Unprotect the :from and :to markers of the WIDGET's parent, if 
necessary.
 >> +
 >> +Changes the :from marker type back to t and the :to marker type 
back to nil."
 >> +  (let* ((parent (widget-get widget :parent))
 >> +         (parent-from-marker (and parent (widget-get parent :from)))
 >> +         (parent-to-marker (and parent (widget-get parent :to))))
 >> +    (when parent-from-marker
 >> +      (set-marker-insertion-type parent-from-marker t))
 >> +    (when parent-to-marker
 >> +      (set-marker-insertion-type parent-to-marker nil))))
 >
 > I'm not a big fan of the name "protect" here, to be honest.
 > Maybe `widget--prepare-parent-for-insertion`?

Sounds a little bit better, thanks.  I went for something similar.

 >> It doesn't catch _all_, in theory, since it might happen
 >> that a grandparent widget doesn't adjust its markers, but maybe that's
 >> unusual enough that we can get away with it.
 >
 > We can probably handle that case easily by just adding to
 > `widget--protect-parent-markers` a recursive call if either the :from or
 > the :to marker had to be adjusted.  The only difficulty I see is making
 > sure we adjust all the makers in the "unprotect" case that we
 > protected earlier.  Maybe we should make
 > `widget--protect-parent-markers` return a list of (MARKER
 > . PREVIOUS-TYPE) so the `widget--unprotect-parent-markers`
 > would turn into something like (mapcar (apply-partially #'apply
 > #'set-marker-insertion-type) ...).
 > IIUC that list would be empty in the vast majority of cases.

Thanks for this idea.

I attach a patch that implements something like that, along with a new
test to check the recursive case.

--------------Lt9j0hEEI7Uv6NkKb0vRJRNq
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Prepare-markers-for-insertions-inside-of-a-widget.patch"
Content-Disposition: attachment;
 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oZXkgd2VyZSB3aGVuIHRoZSBncm91cAorICAgICAgOzsgd2lkZ2V0IHdh
cyBmaXJzdCBjcmVhdGVkLgorICAgICAgKHNob3VsZCAoPSBvZnJvbSAod2lkZ2V0LWdldCBn
cm91cCA6ZnJvbSkpKQorICAgICAgKHNob3VsZCAoPSBvdG8gKHdpZGdldC1nZXQgZ3JvdXAg
OnRvKSkpKSkpCisKKyhlcnQtZGVmdGVzdCB3aWRnZXQtdGVzdC1pbnNlcnRpb24tYXQtcGFy
ZW50LW1hcmtlcnMtMiAoKQorICAiVGVzdCB0aGF0IHJlY3JlYXRpbmcgYSBjaGlsZCBrZWVw
cyB0aGUgcGFyZW50J3MgbWFya2VyIGNvdmVyaW5nIGl0LgorCitUZXN0IHRoZSB1bmNvbW1v
biBzaXR1YXRpb24gaW4gd2hpY2ggd2UgbWlnaHQgbmVlZCB0byBwcmVwYXJlIHRoZSBncmFu
ZHBhcmVudCdzCittYXJrZXJzIChhbmQgc28gb24pIGFzIHdlbGwuIgorICAod2l0aC10ZW1w
LWJ1ZmZlcgorICAgIChsZXQqICgoZ3JvdXAgKHdpZGdldC1jcmVhdGUgJyhncm91cAorICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6Zm9ybWF0ICIldiIKKyAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgKGdyb3VwCisgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICA6Zm9ybWF0ICIldiIKKyAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIChpdGVtIDp2YWx1ZSAxIDpmb3JtYXQgIiV2IikpKSkpCisgICAgICAg
ICAgIChncm91cDIgKGNhciAod2lkZ2V0LWdldCBncm91cCA6Y2hpbGRyZW4pKSkKKyAgICAg
ICAgICAgKGl0ZW0gKGNhciAod2lkZ2V0LWdldCBncm91cDIgOmNoaWxkcmVuKSkpCisgICAg
ICAgICAgIChvZnJvbSAobWFya2VyLXBvc2l0aW9uICh3aWRnZXQtZ2V0IGdyb3VwIDpmcm9t
KSkpCisgICAgICAgICAgIChvdG8gKG1hcmtlci1wb3NpdGlvbiAod2lkZ2V0LWdldCBncm91
cCA6dG8pKSkKKyAgICAgICAgICAgKG9mcm9tMiAobWFya2VyLXBvc2l0aW9uICh3aWRnZXQt
Z2V0IGdyb3VwMiA6ZnJvbSkpKQorICAgICAgICAgICAob3RvMiAobWFya2VyLXBvc2l0aW9u
ICh3aWRnZXQtZ2V0IGdyb3VwMiA6dG8pKSkpCisgICAgICAod2lkZ2V0LWluc2VydCAiXG4i
KQorICAgICAgKHdpZGdldC1zZXR1cCkKKyAgICAgICh3aWRnZXQtdmFsdWUtc2V0IGl0ZW0g
MikKKyAgICAgIChzaG91bGQgKD0gb2Zyb20gKHdpZGdldC1nZXQgZ3JvdXAgOmZyb20pKSkK
KyAgICAgIChzaG91bGQgKD0gb3RvICh3aWRnZXQtZ2V0IGdyb3VwIDp0bykpKQorICAgICAg
KHNob3VsZCAoPSBvZnJvbTIgKHdpZGdldC1nZXQgZ3JvdXAyIDpmcm9tKSkpCisgICAgICAo
c2hvdWxkICg9IG90bzIgKHdpZGdldC1nZXQgZ3JvdXAyIDp0bykpKSkpKQorCiA7Ozsgd2lk
LWVkaXQtdGVzdHMuZWwgZW5kcyBoZXJlCi0tIAoyLjM0LjEKCg==

--------------Lt9j0hEEI7Uv6NkKb0vRJRNq--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 17 Jan 2025 04:28:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 16 23:28:13 2025
Received: from localhost ([127.0.0.1]:35570 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tYdxs-0000U2-Sh
	for submit <at> debbugs.gnu.org; Thu, 16 Jan 2025 23:28:13 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:28535)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1tYdxr-0000Tn-2Y
 for 69941 <at> debbugs.gnu.org; Thu, 16 Jan 2025 23:28:11 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C7E5C442927;
 Thu, 16 Jan 2025 23:28:04 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1737088083;
 bh=6vkeKbt0sM5Uuz/ukKAay4hbHeec4bKk2pw2rMquNso=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=ERbNn1cJISGKoqrfiegTrq3jnHz/zotaPiuMAqcRqWjEqkikKOl9MGmtoyp/QhAM1
 yHR58jwvOk3b952lm0ETdQRNmmexLNXUMr9b27QoXrwEe24FXfpxkErqzCyBCaZd45
 KhXVF4tu9yB/UqSlHYFAp+74AKQvIhHMVa9brwPiaxu3QcOhz4pFOJD7lmbZ81So4P
 o37tXqD9idO29npsuf3TPCp360NLl7s58LFVolOHfcRnKhJfVVuaaKqIq02H5euMyp
 37tc/3ngTlyxWyq+tiHxuQTbPf2QI8nBGdEk/JR+H2i286VwtHuZZAnK1qnAQjd5au
 +m8pwrT2yx5bA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 84988442925;
 Thu, 16 Jan 2025 23:28:03 -0500 (EST)
Received: from pastel (104-195-232-86.cpe.teksavvy.com [104.195.232.86])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4FDF012039E;
 Thu, 16 Jan 2025 23:28:03 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Mauro Aranda <maurooaranda@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <add886d6-aecf-4664-be5a-2ccc718458cb@HIDDEN> (Mauro Aranda's
 message of "Mon, 13 Jan 2025 11:35:54 -0300")
Message-ID: <jwvfrlit6u0.fsf-monnier+emacs@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN>
 <87le3fljk5.fsf@HIDDEN> <864ja3d0h5.fsf@HIDDEN>
 <87cyorldxf.fsf@HIDDEN>
 <add886d6-aecf-4664-be5a-2ccc718458cb@HIDDEN>
Date: Thu, 16 Jan 2025 23:28:02 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.003 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, Stephen Berman <stephen.berman@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> I attach a patch with a first idea (based on Stefan's suggestions),
> where we "protect" the parent's markers, inside widget-default-create.
> This is so we can try to catch almost all situations where this bug
> might arise.

I can't judge whether `widget-default-create` covers all the cases, but
other than that, it's looking good (well, I find this "set and later reset"
to be rather ugly/brittle, but that's probably as good as it gets given
what we have).

> +(defun widget--protect-parent-markers (widget)
> +  "Protect the :from and :to markers of the WIDGET's parent, if necessary.
> +
> +Usually, the :from marker has type t, while the :to marker has type nil.
> +When creating a child or a button inside a composite widget, they have to be
> +changed to nil and t respectively, so that the WIDGET's parent (if any),
> +properly contains all of its children and buttons."
> +  (let* ((parent (widget-get widget :parent))
> +         (parent-from-marker (and parent (widget-get parent :from)))
> +         (parent-to-marker (and parent (widget-get parent :to)))
> +         (pos (point)))
> +    (when (and parent-from-marker
> +               (eq pos (marker-position parent-from-marker)))
> +      (set-marker-insertion-type parent-from-marker nil))
> +    (when (and parent-to-marker
> +               (eq pos (marker-position parent-to-marker)))
> +      (set-marker-insertion-type parent-to-marker t))))
> +
> +(defun widget--unprotect-parent-markers (widget)
> +  "Unprotect the :from and :to markers of the WIDGET's parent, if necessary.
> +
> +Changes the :from marker type back to t and the :to marker type back to nil."
> +  (let* ((parent (widget-get widget :parent))
> +         (parent-from-marker (and parent (widget-get parent :from)))
> +         (parent-to-marker (and parent (widget-get parent :to))))
> +    (when parent-from-marker
> +      (set-marker-insertion-type parent-from-marker t))
> +    (when parent-to-marker
> +      (set-marker-insertion-type parent-to-marker nil))))

I'm not a big fan of the name "protect" here, to be honest.
Maybe `widget--prepare-parent-for-insertion`?

> It doesn't catch _all_, in theory, since it might happen
> that a grandparent widget doesn't adjust its markers, but maybe that's
> unusual enough that we can get away with it.

We can probably handle that case easily by just adding to
`widget--protect-parent-markers` a recursive call if either the :from or
the :to marker had to be adjusted.  The only difficulty I see is making
sure we adjust all the makers in the "unprotect" case that we
protected earlier.  Maybe we should make
`widget--protect-parent-markers` return a list of (MARKER
. PREVIOUS-TYPE) so the `widget--unprotect-parent-markers`
would turn into something like (mapcar (apply-partially #'apply
#'set-marker-insertion-type) ...).
IIUC that list would be empty in the vast majority of cases.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 13 Jan 2025 14:36:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 13 09:36:08 2025
Received: from localhost ([127.0.0.1]:50810 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tXLXz-0006uA-Pe
	for submit <at> debbugs.gnu.org; Mon, 13 Jan 2025 09:36:08 -0500
Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:47346)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maurooaranda@HIDDEN>)
 id 1tXLXx-0006th-Mi
 for 69941 <at> debbugs.gnu.org; Mon, 13 Jan 2025 09:36:06 -0500
Received: by mail-pl1-x62a.google.com with SMTP id
 d9443c01a7336-21680814d42so63120465ad.2
 for <69941 <at> debbugs.gnu.org>; Mon, 13 Jan 2025 06:36:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1736778959; x=1737383759; darn=debbugs.gnu.org;
 h=in-reply-to:from:content-language:references:cc:to:subject
 :user-agent:mime-version:date:message-id:from:to:cc:subject:date
 :message-id:reply-to;
 bh=tzWGMZ27MJNSbehORP8AchqEkEmodZMYJQPlAK0LYpE=;
 b=WROpqQ2gBUxK4Rr/Kx4OSt0eZNndbGfqINCvY4+DwuiiaupNY2DANxFV3fsFRVH/3f
 GatpABnGp58XiUFR+Fz7iNCMDv8K21CLmba499X340/y9rFj11bSx42ZnZ86puV0ofgi
 bTck+axWHB/FCx7tut1HdHLTYdAeibKCxInDyYmf9dGTaMk/9zdH+4lHNEpfw6lv9dx3
 VZLx76KWLq8HC2tG/6kPJrD+pBCCqXLb0df5ESclKbkvTr7IMYtdyS2VutB683bhj/Z0
 m5JNHQ67v+j9ayf1ofoUL5B4mMByExUgEY4/fuS0/z8V0rvsQM2+1Mbx8O3i75n3wmM4
 i3mQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1736778959; x=1737383759;
 h=in-reply-to:from:content-language:references:cc:to:subject
 :user-agent:mime-version:date:message-id:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=tzWGMZ27MJNSbehORP8AchqEkEmodZMYJQPlAK0LYpE=;
 b=In/xExUFtdDA0PzrYg3jnSr9853NRx/4Q3O3phJIjBW/FYne4jIVBBjvViRImUYGJi
 iWAvrs7hNEVECY4wZem83kdWrUovAmQXbz3fvLGMUJBhRSU84yQU0yu+7QyGiih3uE43
 KLg5niUONZ/ca5hKCNDQLAsEWq+be/vpgMrpSmeDIosPJy2wUhXULoFW+QTZxiDhzC0H
 e23ouwD9TUUQtudhWwQFqEOBCnqnie1vGrTOYnzXXKa9dXoJsHvF1XS0gqsgMSO7qVAI
 c687KSudGY3GsWuF30FGlniBG10fI8Wu435rRRn+EpW2v/NsLMgIwkm3ZLX717GksSq6
 06bg==
X-Forwarded-Encrypted: i=1;
 AJvYcCVgzncLhwo49wE6rvSJLWYFsg0C3FSVllMExSvlhtRFFGGQg0fojwHX26++6CZy9gPH2xof6w==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YyJIDzol/ri2UaRkAmD2AqeZF3Xf+P0sjZjo/KyN3NiiSieq1Az
 aHyX4Ir8J7UMkyzBOUzE6T/yztW6lmNnI2MOHRoIj7HGoI1+ISPi
X-Gm-Gg: ASbGncuToTiu9oL2tRn4x1Yomvzw/qtsMwCiB5fcNu8vTGhz0inIBs5XEM61mdqCnkG
 6SN6HaDS53gZ1NOe+LW3YhmCnykR9qode+8mXKpKvmeUrRVQN3YU/C61NgSAhTx6YEht6N3KTDx
 gLqipGA5BLPVLg07mHaXTJ6+NyDizYLR20EM0+8AfS8rCYuBd/UBsXwPVmr7D/LI1PaJLAIOp+Z
 Q+WzeYV9ScCHNGmxrKxMKWeAUxhKb/uELCncxOPH9IZYbPNTg/fPMRnyhiQ330=
X-Google-Smtp-Source: AGHT+IH3N6NvjedcHanWjkK0vbgx9cwL67SZDyF9i2MvTRwhkmhz40huHD3kE2zqhH2cn2nhvae5RA==
X-Received: by 2002:a17:902:f70f:b0:212:4c82:e3d4 with SMTP id
 d9443c01a7336-21a83fd90e6mr319263125ad.46.1736778959190; 
 Mon, 13 Jan 2025 06:35:59 -0800 (PST)
Received: from [192.168.0.234] ([181.228.33.6])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-21a9f153486sm54685395ad.105.2025.01.13.06.35.56
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 13 Jan 2025 06:35:57 -0800 (PST)
Content-Type: multipart/mixed; boundary="------------7VoOS42M9pFe29trTYxsE0Qh"
Message-ID: <add886d6-aecf-4664-be5a-2ccc718458cb@HIDDEN>
Date: Mon, 13 Jan 2025 11:35:54 -0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
To: Stephen Berman <stephen.berman@HIDDEN>, 69941 <at> debbugs.gnu.org
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN> <87le3fljk5.fsf@HIDDEN>
 <864ja3d0h5.fsf@HIDDEN> <87cyorldxf.fsf@HIDDEN>
Content-Language: en-US
From: Mauro Aranda <maurooaranda@HIDDEN>
In-Reply-To: <87cyorldxf.fsf@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 69941
Cc: Eli Zaretskii <eliz@HIDDEN>, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------7VoOS42M9pFe29trTYxsE0Qh
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

It turns out the problem is general to all composite widgets.  Luckily,
it seems that it only surfaces in corner cases, and mostly as a
fontification problem.

Stefan detected the problem: widgets whose children get recreated (but
they themselves don't) might end up with their markers not containing
the entire child anymore.  But since it might happen with any composite
widget, we can't just fix this for radio or checklist widgets.

I attach a patch with a first idea (based on Stefan's suggestions),
where we "protect" the parent's markers, inside widget-default-create.
This is so we can try to catch almost all situations where this bug
might arise.  It doesn't catch _all_, in theory, since it might happen
that a grandparent widget doesn't adjust its markers, but maybe that's
unusual enough that we can get away with it.

The patch includes a test, that hopefully shows how easy is to make this
bug appear.

--------------7VoOS42M9pFe29trTYxsE0Qh
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Protect-parent-markers-when-recreating-a-child-widge.patch"
Content-Disposition: attachment;
 filename*0="0001-Protect-parent-markers-when-recreating-a-child-widge.pa";
 filename*1="tch"
Content-Transfer-Encoding: base64

RnJvbSAxNTM4MjhkYWRiNWU2MWE3YjQ0NmIyYmM0YzU1NzNhYWMwY2FlYmFmIE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBNYXVybyBBcmFuZGEgPG1hdXJvb2FyYW5kYUBnbWFp
bC5jb20+CkRhdGU6IFN1biwgMTIgSmFuIDIwMjUgMTc6Mjg6NDEgLTAzMDAKU3ViamVjdDog
W1BBVENIXSBQcm90ZWN0IHBhcmVudCBtYXJrZXJzIHdoZW4gcmVjcmVhdGluZyBhIGNoaWxk
IHdpZGdldAoKUmVjcmVhdGluZyBjaGlsZCB3aWRnZXRzIHdpdGhvdXQgcmVjcmVhdGluZyB0
aGUgcGFyZW50IHdp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0aGUgc2FtZSBhcyB0
aGV5IHdlcmUgd2hlbiB0aGUgZ3JvdXAKKyAgICAgIDs7IHdpZGdldCB3YXMgZmlyc3QgY3Jl
YXRlZC4KKyAgICAgIChzaG91bGQgKD0gb2Zyb20gKHdpZGdldC1nZXQgZ3JvdXAgOmZyb20p
KSkKKyAgICAgIChzaG91bGQgKD0gb3RvICh3aWRnZXQtZ2V0IGdyb3VwIDp0bykpKSkpKQor
CiA7Ozsgd2lkLWVkaXQtdGVzdHMuZWwgZW5kcyBoZXJlCi0tIAoyLjM0LjEKCg==

--------------7VoOS42M9pFe29trTYxsE0Qh--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 9 Jan 2025 12:54:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 09 07:54:11 2025
Received: from localhost ([127.0.0.1]:50767 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tVs38-000677-IL
	for submit <at> debbugs.gnu.org; Thu, 09 Jan 2025 07:54:10 -0500
Received: from mail-vk1-xa36.google.com ([2607:f8b0:4864:20::a36]:54777)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maurooaranda@HIDDEN>)
 id 1tVs36-00066m-Rh
 for 69941 <at> debbugs.gnu.org; Thu, 09 Jan 2025 07:54:09 -0500
Received: by mail-vk1-xa36.google.com with SMTP id
 71dfb90a1353d-5188c6f260cso319002e0c.1
 for <69941 <at> debbugs.gnu.org>; Thu, 09 Jan 2025 04:54:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1736427243; x=1737032043; darn=debbugs.gnu.org;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:newsgroups:cc:to:subject:user-agent:mime-version:date
 :message-id:from:to:cc:subject:date:message-id:reply-to;
 bh=8LZzDLW5U+NXG69qFmiVA6FX6ByovsZ2cXPzcZvkUQM=;
 b=fkaMWNI/yr2thY+OnoKrJLciZMvT+JBnSwN32qqnlLO5yOW1ioyTxtyqFEka+SIsyk
 DRi3FiS8vy9kzyVNayq3SmH1XMSlE3C2kEMErGxivUv/4N7D+I0RhCnCN8bJSwE0DkPR
 IF5hsuANRmO59SMp5Xu3UxIJlNbc1A619fH7JVMATYaynDE+wS9XyyptCHX0xMyoou3u
 RkOTu5Y3SOekD4PgkTAETv0Ij+9F4w/ImMS4ZwqvRx1QfRbFDCGFwSY7vRIXf5cl/ZYR
 +JKYIXIZ/r2ribUHdVUZe4CEfZsFFEPtf6Wfj6DpeuXYrDvwrtkFibPi5DyaeyJ1bRRO
 Ay2Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1736427243; x=1737032043;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:newsgroups:cc:to:subject:user-agent:mime-version:date
 :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=8LZzDLW5U+NXG69qFmiVA6FX6ByovsZ2cXPzcZvkUQM=;
 b=CFvEzGMMf23A5CCH8rg1M8JAN3zJnIPi/Hzhqdh13tUBoEn+DAKNz3WnDJEgrK5twA
 7Ku5kNdyzgv3RlRaJqCEmy+cr10FYWDJhg/OT41RqFl2+daZZgLEvdYbWqGBwUdfrs3x
 IoXI6HdVMDn9kSBk37MhGJ2bDgiowBUfpK74vBiefs/BsJEVUZhdyiUaZ2HZTWzNfkyd
 12TGGX4VVMh8Q/UZoW0U8bCH2FQBa7zbfwtesphXKrTq3GldaXEXSA2VPSMEFPC4yTEo
 sn9WaW3lbzcHH/sGp5RBf9dPw1zG0w/j+H/zCMompb9NeQ9WRBwPvC6zmavfEOQNPSb3
 TFfw==
X-Gm-Message-State: AOJu0Yw5/i246wMiVyd34nSEQaWEHT6/E/gnFQ71DL6LA0RR1hcEX1/W
 16C4eBus9XQVZQ2GHOEDd+fEjXRJ15DPy6uri4ycYz1j1Ldy4gJw
X-Gm-Gg: ASbGncuz6Cwtv+rEfQ7aOmupZROvv72hS+PqzPKnXo/3uBwiYRMnNUbYcw7QVZhpmO7
 e0W7JBSjbORIF608aYCyGd9BLojv9rkbPeR/fJoCmtmLvjqLHALnH7FPOONtxGAzoLyxrWoDnPG
 h1wU8u8drJlOg4Z2SnLtVoOF0W6nsH/QmPa9yACSlyNJtVPVFFPzOsp/KBQND5YSkx30B0k72sT
 O5c8ACpc6na9So6Wod4KTSQxOZ8vmZFoioifiEjn1/Rt4waUaK2RsSmNUGHIRE=
X-Google-Smtp-Source: AGHT+IHTZS1QogypSy0C1wPupMAs5cnPNfWLRoSQk2vpH/Wvygc7xXDFcAXI78zzONH+Wsx5ObSgZA==
X-Received: by 2002:a05:6122:3128:b0:518:7777:a61e with SMTP id
 71dfb90a1353d-51c6c464ec6mr5059089e0c.5.1736427243072; 
 Thu, 09 Jan 2025 04:54:03 -0800 (PST)
Received: from [192.168.0.234] ([181.228.33.6])
 by smtp.gmail.com with ESMTPSA id
 71dfb90a1353d-51c7fbfe229sm671811e0c.24.2025.01.09.04.54.00
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 09 Jan 2025 04:54:02 -0800 (PST)
Message-ID: <4103ee70-0f42-4f91-b00e-a47fe42e183b@HIDDEN>
Date: Thu, 9 Jan 2025 09:53:58 -0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
To: Stephen Berman <stephen.berman@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Newsgroups: gmane.emacs.bugs
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN> <87le3fljk5.fsf@HIDDEN>
 <864ja3d0h5.fsf@HIDDEN> <87cyorldxf.fsf@HIDDEN>
Content-Language: en-US
From: Mauro Aranda <maurooaranda@HIDDEN>
In-Reply-To: <87cyorldxf.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stephen Berman <stephen.berman@HIDDEN> writes:

 > On Sat, 08 Jun 2024 16:32:06 +0300 nobody wrote:
 >
 >>> From: Stephen Berman <stephen.berman@HIDDEN>
 >>> Cc: monnier@HIDDEN,  69941 <at> debbugs.gnu.org
 >>> Date: Sat, 08 Jun 2024 14:12:42 +0200
 >>>
 >>> On Sat, 08 Jun 2024 14:50:57 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:
 >>>
 >>> >> From: Stephen Berman <stephen.berman@HIDDEN>
 >>> >> Cc: Stefan Monnier <monnier@HIDDEN>, 
69941 <at> debbugs.gnu.org
 >>> >> Date: Sat, 25 May 2024 11:30:23 +0200
 >>> >>
 >>> >> On Sat, 25 May 2024 10:51:08 +0300 Eli Zaretskii <eliz@HIDDEN> 
wrote:
 >>> >>
 >>> >> > Ping!  Any further comments about this, or changes to install?
 >>> >>
 >>> >> I haven't been able to pursue Stefan's suggestions yet.  For the use
 >>> >> case for which I made the patch, I find the results overall 
better than
 >>> >> without it.  Nevertheless, text inserted in front of the first radio
 >>> >> button unintentionally getting fontified with widget-inactive 
face is a
 >>> >> clear bug, so I think the patch should not be installed; I hope 
I (or
 >>> >> someone else) can improve it.
 >>> >
 >>> > Stefan, any other comments?  Should I close the bug?
 >>>
 >>> While my patch prevents the misfontification I reported in my OP, it
 >>> adds another source of misfontification and is therefore not suitable
 >>> for installing.  So the original bug remains and I think this bug 
report
 >>> should not yet be closed.
 >>
 >> OK, but what shall we do instead?  Is anyone working on this?
 >
 > I'm really unclear how to try and implement what Stefan suggested.
 > Perhaps Mauro or someone else more familiar with the widget code might
 > be able to do it or give me some guidance.
 >
 > Steve Berman

I'll work on this bug.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 Jan 2025 12:54:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 09 07:54:21 2025
Received: from localhost ([127.0.0.1]:50770 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tVs3J-00067Y-2T
	for submit <at> debbugs.gnu.org; Thu, 09 Jan 2025 07:54:21 -0500
Received: from lists.gnu.org ([2001:470:142::17]:57586)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1tVs3H-00067I-9g
 for submit <at> debbugs.gnu.org; Thu, 09 Jan 2025 07:54:19 -0500
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 <geb-bug-gnu-emacs@HIDDEN>)
 id 1tVs39-0003Zz-Sa
 for bug-gnu-emacs@HIDDEN; Thu, 09 Jan 2025 07:54:12 -0500
Received: from ciao.gmane.io ([116.202.254.214])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1tVs38-0008E7-ER
 for bug-gnu-emacs@HIDDEN; Thu, 09 Jan 2025 07:54:11 -0500
Received: from list by ciao.gmane.io with local (Exim 4.92)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1tVs35-0007Wh-1n
 for bug-gnu-emacs@HIDDEN; Thu, 09 Jan 2025 13:54:07 +0100
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Mauro Aranda <maurooaranda@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
Date: Thu, 9 Jan 2025 09:53:58 -0300
Message-ID: <4103ee70-0f42-4f91-b00e-a47fe42e183b@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN> <87le3fljk5.fsf@HIDDEN>
 <864ja3d0h5.fsf@HIDDEN> <87cyorldxf.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <87cyorldxf.fsf@HIDDEN>
Received-SPF: pass client-ip=116.202.254.214;
 envelope-from=geb-bug-gnu-emacs@HIDDEN; helo=ciao.gmane.io
X-Spam_score_int: 3
X-Spam_score: 0.3
X-Spam_bar: /
X-Spam_report: (0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001,
 FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
 HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Stephen Berman writes: > On Sat, 08 Jun 2024 16:32:06 +0300
 nobody wrote: > >>> From: Stephen Berman >>> Cc: monnier@HIDDEN,
 69941 <at> debbugs.gnu.org >>> Date: Sat, 08 Jun 2024 14:12:42 +0200 >>> >>> On
 Sat, 08 Ju [...] 
 Content analysis details:   (1.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.0 T_SPF_PERMERROR        SPF: test of record failed (permerror)
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (maurooaranda[at]gmail.com)
 1.0 FORGED_GMAIL_RCVD      'From' gmail.com does not match 'Received'
 headers
 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
 mail domains are different
 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
 EnvelopeFrom freemail headers are different
X-Debbugs-Envelope-To: submit
Cc: 69941 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.2 (/)

Stephen Berman <stephen.berman@HIDDEN> writes:

 > On Sat, 08 Jun 2024 16:32:06 +0300 nobody wrote:
 >
 >>> From: Stephen Berman <stephen.berman@HIDDEN>
 >>> Cc: monnier@HIDDEN,  69941 <at> debbugs.gnu.org
 >>> Date: Sat, 08 Jun 2024 14:12:42 +0200
 >>>
 >>> On Sat, 08 Jun 2024 14:50:57 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:
 >>>
 >>> >> From: Stephen Berman <stephen.berman@HIDDEN>
 >>> >> Cc: Stefan Monnier <monnier@HIDDEN>, 
69941 <at> debbugs.gnu.org
 >>> >> Date: Sat, 25 May 2024 11:30:23 +0200
 >>> >>
 >>> >> On Sat, 25 May 2024 10:51:08 +0300 Eli Zaretskii <eliz@HIDDEN> 
wrote:
 >>> >>
 >>> >> > Ping!  Any further comments about this, or changes to install?
 >>> >>
 >>> >> I haven't been able to pursue Stefan's suggestions yet.  For the use
 >>> >> case for which I made the patch, I find the results overall 
better than
 >>> >> without it.  Nevertheless, text inserted in front of the first radio
 >>> >> button unintentionally getting fontified with widget-inactive 
face is a
 >>> >> clear bug, so I think the patch should not be installed; I hope 
I (or
 >>> >> someone else) can improve it.
 >>> >
 >>> > Stefan, any other comments?  Should I close the bug?
 >>>
 >>> While my patch prevents the misfontification I reported in my OP, it
 >>> adds another source of misfontification and is therefore not suitable
 >>> for installing.  So the original bug remains and I think this bug 
report
 >>> should not yet be closed.
 >>
 >> OK, but what shall we do instead?  Is anyone working on this?
 >
 > I'm really unclear how to try and implement what Stefan suggested.
 > Perhaps Mauro or someone else more familiar with the widget code might
 > be able to do it or give me some guidance.
 >
 > Steve Berman

I'll work on this bug.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 8 Jun 2024 14:14:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 08 10:14:54 2024
Received: from localhost ([127.0.0.1]:39180 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sFwqM-0007D2-B3
	for submit <at> debbugs.gnu.org; Sat, 08 Jun 2024 10:14:54 -0400
Received: from mout.gmx.net ([212.227.17.21]:46871)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1sFwqH-0007Ch-19
 for 69941 <at> debbugs.gnu.org; Sat, 08 Jun 2024 10:14:53 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1717856061; x=1718460861; i=stephen.berman@HIDDEN;
 bh=f0CxosA7i/DW03ZcWXkW3NS5R742jPFGtbRAExi6ris=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=Bd9nP2ruktHO+P5e4pjc9Lmf7yFyRibUParZB3LLHoafCmJbYGJjDTHPO6USG6ge
 AKSHjmT6tXvNOYx7zOXdCySA+V9eP949xVqneICrftRvh3PyiDL8LIpB5E1TN9/Qo
 OmzHzgjIZVmtOU9JshbazTf/15i2jwdLBTBiuwsQ+pJnRZM6aG6BKK3/3kCCmNyxK
 ObKc37VNEUOnb98mSuOndUQx/5p2K3SNLkMW/pOV1ynP0mvEJy9Yr0lCnHeoX01BB
 ziPPlunZc6ubH2lMV75XpSzoTXiQIqK9pt6m0qkMUrCSlahPNVQZZ/XWGxJUGuL1A
 ucaqZtvJQa/GePiwvw==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfs ([94.134.94.137]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MLzFx-1ryYRQ2gRV-00Kcep; Sat, 08
 Jun 2024 16:14:21 +0200
From: Stephen Berman <stephen.berman@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <864ja3d0h5.fsf@HIDDEN> (nobody's message of "Sat, 08 Jun 2024
 16:32:06 +0300")
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN>
 <87le3fljk5.fsf@HIDDEN> <864ja3d0h5.fsf@HIDDEN>
Date: Sat, 08 Jun 2024 16:14:20 +0200
Message-ID: <87cyorldxf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:/B3PhgXcRmTV8OEYE3vXnRdflkMdu/YN7AMp6qIYg2VZfHVHwCz
 vEH/17r7nPaBSEGR6JZ0RON7hiRhxUwAMhsFTPqBTEcvnc5LXxERAVKEjUQ8O+TTK1YKvBY
 8ULxPy+1wYkwjtYsjsTxLGsC7/37/ODX+1Z3u0z4oSQ37bx1ygaduvcmTrf8UYc0cUxk1Nu
 uUsGYGSmlZMYNbfZE4U9A==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:H6W3ltsj6OY=;IYFzM7Q1+2sI4sOCwmUktjyY9f7
 31na1FmzVxDW5h+saUATsireZHRUfD4rdKc7AzYgmbJqYfDiujGFwWqVWahUVIjZ/DZnJDYHB
 y/BGvDNv8jIvDSW4k4oqUNC0OgCyicNBVIfZ9SxKZOyU5QvkZWJBRcqXb1GnlVn08EuoxwSH3
 kQZ7r8csaaPe/hpOCZ6g0Eplyupvmf/Akh3ugRKQ+uoQiPgvIgVb4BUBzzaHByqTMH7HDrWFJ
 c5UR79IPCixOB6wKP84x4XqHWupseqoXWmBs1kRLpwMIi4bThHbFSKAV+BjgkNPXhJHNOtexH
 0C5ALJCR9NLKhKnPQr8K0aFmVRE2OR4etWlVYs1sLP76fEcX0ly1Ke00Zrroqf/pNnBLRN47x
 Amh2HE8PLkkAB0ChMlBzjZh3Pet7ddtKEnOA+M8r/v1HOGpbJBBOqEVKr/7elokXn+KvRxVQ5
 +L7XzMMmHGdURrhf5NjZrlSzrXE6n0k75C2huc0/uZcM89V0KbnNklBNP8DEG+uq6Jrpy19Q5
 5rzo8u3yPU5gDeja2ll6g6CtPqhrzjUcVkk+TVOf32Uy92WJ+ObzI79sGBG3puRxU1i4Rx/2w
 E6zTCJ0H1/KbqkQ9FXH3FzttmrqzbocBKTOP1Ch+F5BKx5mp/5gmuSGJmnmdnI6Hzc/9fdbYP
 rGC0sf9zw5RH67xsN7fL4rhdM0MZlcWXGY4HQwAvUZFpUbKHMIdh0haqZe7PkTaXvm4EssTAy
 +skfHR6e+m18AZGYC6kL/JafrogWDvQFWjJq4xZUFHC821FaMZ1Zv5+zKP4zjs8Ix4MA/ZTf2
 eBL5AVJnr1gA36roRpt0jnIG9q7zQ2fzXNooTQk12aCGg=
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Sat, 08 Jun 2024 16:32:06 +0300 nobody wrote:

>> From: Stephen Berman <stephen.berman@HIDDEN>
>> Cc: monnier@HIDDEN,  69941 <at> debbugs.gnu.org
>> Date: Sat, 08 Jun 2024 14:12:42 +0200
>>
>> On Sat, 08 Jun 2024 14:50:57 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:
>>
>> >> From: Stephen Berman <stephen.berman@HIDDEN>
>> >> Cc: Stefan Monnier <monnier@HIDDEN>,  69941@HIDDEN=
g
>> >> Date: Sat, 25 May 2024 11:30:23 +0200
>> >>
>> >> On Sat, 25 May 2024 10:51:08 +0300 Eli Zaretskii <eliz@HIDDEN> wrot=
e:
>> >>
>> >> > Ping!  Any further comments about this, or changes to install?
>> >>
>> >> I haven't been able to pursue Stefan's suggestions yet.  For the use
>> >> case for which I made the patch, I find the results overall better t=
han
>> >> without it.  Nevertheless, text inserted in front of the first radio
>> >> button unintentionally getting fontified with widget-inactive face i=
s a
>> >> clear bug, so I think the patch should not be installed; I hope I (o=
r
>> >> someone else) can improve it.
>> >
>> > Stefan, any other comments?  Should I close the bug?
>>
>> While my patch prevents the misfontification I reported in my OP, it
>> adds another source of misfontification and is therefore not suitable
>> for installing.  So the original bug remains and I think this bug repor=
t
>> should not yet be closed.
>
> OK, but what shall we do instead?  Is anyone working on this?

I'm really unclear how to try and implement what Stefan suggested.
Perhaps Mauro or someone else more familiar with the widget code might
be able to do it or give me some guidance.

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 8 Jun 2024 13:32:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 08 09:32:32 2024
Received: from localhost ([127.0.0.1]:37914 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sFwBL-0005l3-Tm
	for submit <at> debbugs.gnu.org; Sat, 08 Jun 2024 09:32:32 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47376)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sFwBJ-0005kn-Pn
 for 69941 <at> debbugs.gnu.org; Sat, 08 Jun 2024 09:32:30 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sFwAy-0007lp-Kn; Sat, 08 Jun 2024 09:32:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=jaVbAg+hS2wUNTB/VjG20+SszkaV9TsIV8AyXbOQXYw=; b=Y00vn6P28Djn
 CcCRcDoMT1yF4bQHGxPl8n2eTgFUfeUmTgpM1J2q7WmrSy6eWV3xblGBn2rlBBUe7QMA/yNYs2ZFu
 rPtLUE1ObhCgFAuWub0zgXW+fJ2B2XDVQla0KboxcaCcLzdCuTmgVd0x/w9xCJJIqkToVGtwQBnXP
 DoXWhtAGfV8X/ZzfsEFr0SLVwduMQxchTTnPKEkvroyIV+vshYVDriVgWWSovl1rXas52l3go5Tdd
 Mta3k3lVwtHkhV0hJqNsBOLqWQprSyp5KLfD6ovowfBqNDJVDsXQ0GxtScqGcO1aH/Viv9FC9gAQe
 x9M7rxee8HIhtzuqYv/34A==;
Date: Sat, 08 Jun 2024 16:32:06 +0300
Message-Id: <864ja3d0h5.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stephen Berman <stephen.berman@HIDDEN>
In-Reply-To: <87le3fljk5.fsf@HIDDEN> (message from Stephen Berman on Sat, 08
 Jun 2024 14:12:42 +0200)
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN>
 <87le3fljk5.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stephen Berman <stephen.berman@HIDDEN>
> Cc: monnier@HIDDEN,  69941 <at> debbugs.gnu.org
> Date: Sat, 08 Jun 2024 14:12:42 +0200
> 
> On Sat, 08 Jun 2024 14:50:57 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:
> 
> >> From: Stephen Berman <stephen.berman@HIDDEN>
> >> Cc: Stefan Monnier <monnier@HIDDEN>,  69941 <at> debbugs.gnu.org
> >> Date: Sat, 25 May 2024 11:30:23 +0200
> >>
> >> On Sat, 25 May 2024 10:51:08 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:
> >>
> >> > Ping!  Any further comments about this, or changes to install?
> >>
> >> I haven't been able to pursue Stefan's suggestions yet.  For the use
> >> case for which I made the patch, I find the results overall better than
> >> without it.  Nevertheless, text inserted in front of the first radio
> >> button unintentionally getting fontified with widget-inactive face is a
> >> clear bug, so I think the patch should not be installed; I hope I (or
> >> someone else) can improve it.
> >
> > Stefan, any other comments?  Should I close the bug?
> 
> While my patch prevents the misfontification I reported in my OP, it
> adds another source of misfontification and is therefore not suitable
> for installing.  So the original bug remains and I think this bug report
> should not yet be closed.

OK, but what shall we do instead?  Is anyone working on this?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 8 Jun 2024 12:13:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 08 08:13:14 2024
Received: from localhost ([127.0.0.1]:37699 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sFuwc-0002zG-FH
	for submit <at> debbugs.gnu.org; Sat, 08 Jun 2024 08:13:14 -0400
Received: from mout.gmx.net ([212.227.17.22]:49085)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1sFuwX-0002ys-K4
 for 69941 <at> debbugs.gnu.org; Sat, 08 Jun 2024 08:13:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1717848764; x=1718453564; i=stephen.berman@HIDDEN;
 bh=6Buy8pgkGOzMxrt+ytVnAEGY+UElFV942QGc7zirjYc=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=LprHYQsNcEDZwZ5eJ8tmf526zaDUtnH5zvVtKH+GKkH2hbJzIWyFStIzLhsdy+6o
 9nngpstGZmnS3wYr0hnciOf8zIvd1wSxhSeqq4hDg/azIIGYU0/qd02ZvA2xaOmxN
 v4T9gf6BMwPgcsBGhVjw6to/7Um6bpyuiysvq70l7ce1BovQK4ByDvme9JmzSAA+e
 CmyUecGS3p/cj/zX8zS2mbz8rR9Pgh5DIT++q0GetYJqkeGS5CBCAuI7LHsrcbYQZ
 dDW/98AZKruIgInEpAOkUeqUe52xkIGYTxeuX6kz9+2BHaM9YMNoD4lg10CQJcV3u
 BOuJRHDSVnDo2yMBsQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfs ([94.134.94.137]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MEm6F-1sEaH247gJ-00DKte; Sat, 08
 Jun 2024 14:12:44 +0200
From: Stephen Berman <stephen.berman@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <86sexnd55q.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 08 Jun
 2024 14:50:57 +0300")
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN> <86sexnd55q.fsf@HIDDEN>
Date: Sat, 08 Jun 2024 14:12:42 +0200
Message-ID: <87le3fljk5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:RXmcTt1lMsSmUBcT9nUTEx4m4aVoxNOw9KmrztmB5RxekVQANY3
 t0BE5B3ocq1RQY3v5P9JGCeQ0rCMhyW1yshmw1gxD6ed/o+5KD7C2kEWW9An65uRrG8LquE
 /1zod6ffRfKq48tAlUcmT4uo1Gnm7BnaT5u5MIg+Y7/q9zSB8Lvuj9RXJ72vtOYrTMOLJDh
 TGGVFNSkTD25aaJuLLmhQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:R8OMDMO4cYU=;7Si+b7CIZMTMBufPcUTtDRwHIxZ
 TCZ9Tb2MYIOgO29thHjDPBaXVEz/gzajwb/2FTmEGFzs+lHWXxQ8BYHqP2MaDAZeIbyP7XFkC
 6gmKZXfaGy3uskNHoPlqSQAvRnYh4fCucFoLB4hy5Tw5vEn5HxMhPUUSTF56d8X5ph2CJaGpj
 LVGBQjDGLYorNdxqxo4pHRuVf4iLFoexne78UAyYuGul73C21kJ17YyxY+97mf/FB+aoBW+4j
 7yYzPVdwlOtZHfnctAUv5DeWQ3o065jQyF3ntcLIEreZh6mmMVTyOtQuqAfTIQDSE2U1VGIi1
 f3OugqJnsmTVVz6bONd++1wUOZjLRBQ/0cPXyDH1HE8EJxPgf4O5XFVdPgYaCJQ0qSRz4W+xd
 Dw8DAKG8jRuZVFmCmiaeU5AnyTU3Ovp8hs+4IrEG0q83F+DXqOAzfI2r8dam6GjtR7t1kBZsd
 f3du+2AyJ4bR0nX2AoIEzDngqSj4GW5qUAY6fC9jRiKI3FsOPJFmqbrgXudw37cgXOOpg7Nt4
 TAkmH980K4RF/qQh38JBQ/0+Ed1vow1kU+GzEypTX+EgftmpzTH4FQQ3QwYwYSryO9CLPllL9
 VJ1sLvInM2rAMr6xHpzrIU4DojayfULyPffMJwxjlphga0r45rVGqlmo9UyGmx45g471dC4Wl
 CxfLBiKwGTs3NNDsamj68ck2fLxxR1vULp7iTo6KjnQHm8t0K16AkvAOK51DJgxga4B2GHEUG
 McCbqEgrBSpEK3b1DGJpPEgMEW8zaspTVQvUrvd79REXBgRhKljecmPlARZ8D67lDOwTO+Awn
 mssgrxVnNsPyepggpNYthW1RUPQNmwA66k1wmWEP1ZHGM=
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Sat, 08 Jun 2024 14:50:57 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:

>> From: Stephen Berman <stephen.berman@HIDDEN>
>> Cc: Stefan Monnier <monnier@HIDDEN>,  69941 <at> debbugs.gnu.org
>> Date: Sat, 25 May 2024 11:30:23 +0200
>>
>> On Sat, 25 May 2024 10:51:08 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:
>>
>> > Ping!  Any further comments about this, or changes to install?
>>
>> I haven't been able to pursue Stefan's suggestions yet.  For the use
>> case for which I made the patch, I find the results overall better than
>> without it.  Nevertheless, text inserted in front of the first radio
>> button unintentionally getting fontified with widget-inactive face is a
>> clear bug, so I think the patch should not be installed; I hope I (or
>> someone else) can improve it.
>
> Stefan, any other comments?  Should I close the bug?

While my patch prevents the misfontification I reported in my OP, it
adds another source of misfontification and is therefore not suitable
for installing.  So the original bug remains and I think this bug report
should not yet be closed.

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 8 Jun 2024 11:51:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 08 07:51:25 2024
Received: from localhost ([127.0.0.1]:37666 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sFubU-0007y7-QX
	for submit <at> debbugs.gnu.org; Sat, 08 Jun 2024 07:51:25 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60422)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sFubS-0007xo-HW
 for 69941 <at> debbugs.gnu.org; Sat, 08 Jun 2024 07:51:23 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sFub5-00083y-HC; Sat, 08 Jun 2024 07:51:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=G1N4sOgR2hMBlxwevPwjL4MnVAMdFficHSnpzCka47Q=; b=IgG9RFwlHDNj
 RepoplcAWOEAWFrZZUg4cKzTQaPhpJ26Qs5VDanogWuO4HRYZmd82a6/HV9bzda6xFGBuAmTMupjJ
 v9kdopEaH5NYM/SARpwXxiD6pKBboZEI7KjoPZBIlQjwCJeAqcqPl45jEU70YVaUxX2xVjV2T30Au
 CCMFis90T3omKmXo8aKBRXY8ik5bOYvlGsDRx54uRgy4dbPtq+r2FcWjeSqH3fRYkjmxRa3soav9a
 Es+TiTroELy/L6OsVCztKMPgSZ8taSor18g6jHXeP6W2Bl/XqhQfWfkHcP7rh5mlILUJS4cYF7zn+
 K1HC/98iRTnhLFk/9ZUGtg==;
Date: Sat, 08 Jun 2024 14:50:57 +0300
Message-Id: <86sexnd55q.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: monnier@HIDDEN, Stephen Berman <stephen.berman@HIDDEN>
In-Reply-To: <874jam9r2o.fsf@HIDDEN> (message from Stephen Berman on Sat, 25
 May 2024 11:30:23 +0200)
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
 <874jam9r2o.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stephen Berman <stephen.berman@HIDDEN>
> Cc: Stefan Monnier <monnier@HIDDEN>,  69941 <at> debbugs.gnu.org
> Date: Sat, 25 May 2024 11:30:23 +0200
> 
> On Sat, 25 May 2024 10:51:08 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:
> 
> > Ping!  Any further comments about this, or changes to install?
> 
> I haven't been able to pursue Stefan's suggestions yet.  For the use
> case for which I made the patch, I find the results overall better than
> without it.  Nevertheless, text inserted in front of the first radio
> button unintentionally getting fontified with widget-inactive face is a
> clear bug, so I think the patch should not be installed; I hope I (or
> someone else) can improve it.

Stefan, any other comments?  Should I close the bug?

> >> Cc: 69941 <at> debbugs.gnu.org
> >> Date: Mon, 13 May 2024 10:19:43 -0400
> >> From:  Stefan Monnier via "Bug reports for GNU Emacs,
> >>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> >>
> >> >> Or maybe `widget-*-add-item` should temporarily change the insertion
> >> >> type of the from/to markers?
> >> > What do you mean by "temporarily"?
> >>
> >> I think you underestimated the meaning of:
> >>
> >>     I'm really not familiar with the widget code
> >>
> >> I put "really" before the "not", because I know very little about
> >> that code.
> >>
> >> > Maybe it could be left up to the deactivation code to ensure that the
> >> > radio-button-choice widget's :from and the :from of its first child
> >> > coincide when deactivation (and accompanying fontification) occurs, and
> >> > then reset the previous values afterwards.
> >>
> >> I suspect thinking in terms of "activation/deactivation" will not
> >> be helpful.  We should look at the code which does the insertion of text
> >> (which presumably happens, among other things, upon deactivation).
> >>
> >> > Though that seems pretty ad hoc...
> >>
> >> If needed, we might be able to make it less ad-hoc by defining
> >> a function for the purpose of (re)inserting text inside an
> >> existing widget.
> >>
> >> > (and would resetting the :from affect the fontification?)
> >>
> >> It'd be up to that new function to make sure things work as they should.
> >>
> >>
> >>         Stefan
> >>
> >>
> >>
> >>
> >>
> 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 25 May 2024 09:30:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 25 05:30:54 2024
Received: from localhost ([127.0.0.1]:42350 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sAnjq-00053q-GY
	for submit <at> debbugs.gnu.org; Sat, 25 May 2024 05:30:54 -0400
Received: from mout.gmx.net ([212.227.15.19]:55439)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1sAnje-00053i-9j
 for 69941 <at> debbugs.gnu.org; Sat, 25 May 2024 05:30:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1716629424; x=1717234224; i=stephen.berman@HIDDEN;
 bh=IQ/maz2/ThbfPetmgMClxRHEO0rNKMohlJicwMN7920=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=KjzHYh20lUCQlkhvhEJj7u6PIG1o1jo5AgWRV2puG7AUmncosVoAxZf5G/0Otcy+
 oJCiD0ae/4YIVV04w5Wj1cCndBDOsEHdGgdBS+CUTtBEaowr+13KCX1nGX2ayig9t
 Acs0hH1qEJGx7CZdoVil2V0c5COaxrYxNaDG0LkT1aQueLDOCx7c5A/ywTd+zYw/2
 3K2ZkhC4uVtySSL45h98Wew9QAf0YmVHd+0UTfagEX/vJqgFDgrlBGn2jiRpRv7jR
 Rr/m2iTAleaz65QVX7Pz7c9fuleJqI/UnYM/7/P2bOBp2e6DIfCzZYtjKLbEpvAJX
 T736aN/2M3OaHa5J2g==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfs ([94.134.95.181]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MTiPv-1s52yr2tuH-00U65s; Sat, 25
 May 2024 11:30:24 +0200
From: Stephen Berman <stephen.berman@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <86zfsez5w3.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 25 May
 2024 10:51:08 +0300")
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> <86zfsez5w3.fsf@HIDDEN>
Date: Sat, 25 May 2024 11:30:23 +0200
Message-ID: <874jam9r2o.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:cHE76IHJ7dbHUY2Q4NNuR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/9N2gTheum5Hif0CLyGrUi/k4qbO
 43BjmIX4muNjlGkVsdpH6Ejpr/hSdg42r3X0jcGrgySTE=
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 3.6 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  On Sat, 25 May 2024 10:51:08 +0300 Eli Zaretskii wrote: >
 Ping! Any further comments about this, or changes to install? I haven't been
 able to pursue Stefan's suggestions yet. For the use case for which I made
 the patch, I find the results overall better than without it. Nevertheless,
 text inserted in front of the firs [...] 
 Content analysis details:   (3.6 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [212.227.15.19 listed in wl.mailspike.net]
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [94.134.95.181 listed in zen.spamhaus.org]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (stephen.berman[at]gmx.net)
 -0.0 SPF_PASS               SPF: sender matches SPF record
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  On Sat, 25 May 2024 10:51:08 +0300 Eli Zaretskii wrote: >
   Ping! Any further comments about this, or changes to install? I haven't been
    able to pursue Stefan's suggestions yet. For the use case for which I made
    the patch, I find the results overall better than without it. Nevertheless,
    text inserted in front of the firs [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [212.227.15.19 listed in wl.mailspike.net]
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [94.134.95.181 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.15.19 listed in list.dnswl.org]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (stephen.berman[at]gmx.net)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

On Sat, 25 May 2024 10:51:08 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:

> Ping!  Any further comments about this, or changes to install?

I haven't been able to pursue Stefan's suggestions yet.  For the use
case for which I made the patch, I find the results overall better than
without it.  Nevertheless, text inserted in front of the first radio
button unintentionally getting fontified with widget-inactive face is a
clear bug, so I think the patch should not be installed; I hope I (or
someone else) can improve it.

Steve Berman

>> Cc: 69941 <at> debbugs.gnu.org
>> Date: Mon, 13 May 2024 10:19:43 -0400
>> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>>
>> >> Or maybe `widget-*-add-item` should temporarily change the insertion
>> >> type of the from/to markers?
>> > What do you mean by "temporarily"?
>>
>> I think you underestimated the meaning of:
>>
>>     I'm really not familiar with the widget code
>>
>> I put "really" before the "not", because I know very little about
>> that code.
>>
>> > Maybe it could be left up to the deactivation code to ensure that the
>> > radio-button-choice widget's :from and the :from of its first child
>> > coincide when deactivation (and accompanying fontification) occurs, a=
nd
>> > then reset the previous values afterwards.
>>
>> I suspect thinking in terms of "activation/deactivation" will not
>> be helpful.  We should look at the code which does the insertion of tex=
t
>> (which presumably happens, among other things, upon deactivation).
>>
>> > Though that seems pretty ad hoc...
>>
>> If needed, we might be able to make it less ad-hoc by defining
>> a function for the purpose of (re)inserting text inside an
>> existing widget.
>>
>> > (and would resetting the :from affect the fontification?)
>>
>> It'd be up to that new function to make sure things work as they should=
.
>>
>>
>>         Stefan
>>
>>
>>
>>
>>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 25 May 2024 07:51:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 25 03:51:25 2024
Received: from localhost ([127.0.0.1]:41892 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sAmBZ-0006yc-7q
	for submit <at> debbugs.gnu.org; Sat, 25 May 2024 03:51:25 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41210)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sAmBX-0006yW-0E
 for 69941 <at> debbugs.gnu.org; Sat, 25 May 2024 03:51:23 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sAmBK-0008KW-5I; Sat, 25 May 2024 03:51:10 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=NkfqiGcGkxv/vxt3/7uBvr7tSexDDYxgX5FMkMbT1mI=; b=cxgKQYIJlyj3
 N4GRulUZayzEUDrX214Oj2wP7kXmNzownjWWVCGLXs2r5xSBYC0J36p6P7xFcBu7VDlFar4z11zkI
 LWBujaXf6ADis2ouRCNcPFHSIplrmHVEOf3yu/tdkQI4y0Sh0H98ToW/7wWv8iIHbHZ1K+XOcEGTA
 3TzLGaeeMll0a4QOH9GrAE3pTSO3vbpydnU+H2bnknl7qaD2ijEJ0DNc8qivod2OKfYG6SdB5H5rs
 bLvFhwgnA+GM8fW5PAGtZ4Cy9X9oN0jtEegFMErikYGAf4s+DWU/kVltgAaKvGx8RX4TqVjD8ju6m
 xAt985fZ7nAnCb9lLSj09g==;
Date: Sat, 25 May 2024 10:51:08 +0300
Message-Id: <86zfsez5w3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwveda5vlzf.fsf-monnier+emacs@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
 <jwveda5vlzf.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, stephen.berman@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ping!  Any further comments about this, or changes to install?

> Cc: 69941 <at> debbugs.gnu.org
> Date: Mon, 13 May 2024 10:19:43 -0400
> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> >> Or maybe `widget-*-add-item` should temporarily change the insertion
> >> type of the from/to markers?
> > What do you mean by "temporarily"?
> 
> I think you underestimated the meaning of:
> 
>     I'm really not familiar with the widget code
> 
> I put "really" before the "not", because I know very little about
> that code.
> 
> > Maybe it could be left up to the deactivation code to ensure that the
> > radio-button-choice widget's :from and the :from of its first child
> > coincide when deactivation (and accompanying fontification) occurs, and
> > then reset the previous values afterwards.
> 
> I suspect thinking in terms of "activation/deactivation" will not
> be helpful.  We should look at the code which does the insertion of text
> (which presumably happens, among other things, upon deactivation).
> 
> > Though that seems pretty ad hoc...
> 
> If needed, we might be able to make it less ad-hoc by defining
> a function for the purpose of (re)inserting text inside an
> existing widget.
> 
> > (and would resetting the :from affect the fontification?)
> 
> It'd be up to that new function to make sure things work as they should.
> 
> 
>         Stefan
> 
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 13 May 2024 14:19:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 13 10:19:55 2024
Received: from localhost ([127.0.0.1]:33009 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6WWx-0004wQ-HM
	for submit <at> debbugs.gnu.org; Mon, 13 May 2024 10:19:55 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:43917)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s6WWv-0004wG-Df
 for 69941 <at> debbugs.gnu.org; Mon, 13 May 2024 10:19:54 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2BDF1100061;
 Mon, 13 May 2024 10:19:46 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1715609985;
 bh=EiCn0uBIvI8E2yKXzR+5Hc1N/tBmBlEU4+JNNnXzKTs=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=KWQV0NtzVPcxx4ODtR22ulc8m6a1fyu/R0r1i/g2i3Xze4Xtebo9pI266TZIHkq0F
 9wOuDznyUV4mIQcYYIMdlrCVTwk57x/LNFEbtRM6oDoK4mTFCIRq/UZwpsmAu+A4qV
 oq9NR8tvAVC95aCUABzdmtM6GhFnASV7h+CaQe4hgTmKD87H4dVUTZsBY2+hxWxSyY
 kyxkZk3girG/wb0LrRC5pdh+1C4M1aYniRWshJNCY0EW2rxelG6t1vMkOW/tayxNYd
 oEnwgY3MNvaUEI6SO3OSA9WZnKC9LLgUJrUl9p4Y57ty9OW7rL54Z3uy0aAvOzqru3
 a3EJ+L3Eiz2Hw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 136EF100035;
 Mon, 13 May 2024 10:19:45 -0400 (EDT)
Received: from pastel (unknown [45.72.201.215])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id AA3C3120646;
 Mon, 13 May 2024 10:19:44 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <87v83h4y31.fsf@HIDDEN> (Stephen Berman's message of "Mon, 13 May
 2024 15:53:54 +0200")
Message-ID: <jwveda5vlzf.fsf-monnier+emacs@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> <87v83h4y31.fsf@HIDDEN>
Date: Mon, 13 May 2024 10:19:43 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.011 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> Or maybe `widget-*-add-item` should temporarily change the insertion
>> type of the from/to markers?
> What do you mean by "temporarily"?

I think you underestimated the meaning of:

    I'm really not familiar with the widget code

I put "really" before the "not", because I know very little about
that code.

> Maybe it could be left up to the deactivation code to ensure that the
> radio-button-choice widget's :from and the :from of its first child
> coincide when deactivation (and accompanying fontification) occurs, and
> then reset the previous values afterwards.

I suspect thinking in terms of "activation/deactivation" will not
be helpful.  We should look at the code which does the insertion of text
(which presumably happens, among other things, upon deactivation).

> Though that seems pretty ad hoc...

If needed, we might be able to make it less ad-hoc by defining
a function for the purpose of (re)inserting text inside an
existing widget.

> (and would resetting the :from affect the fontification?)

It'd be up to that new function to make sure things work as they should.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 13 May 2024 13:54:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 13 09:54:09 2024
Received: from localhost ([127.0.0.1]:32882 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6W80-0001rn-Q1
	for submit <at> debbugs.gnu.org; Mon, 13 May 2024 09:54:09 -0400
Received: from mout.gmx.net ([212.227.15.19]:43213)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1s6W7x-0001rQ-Ew
 for 69941 <at> debbugs.gnu.org; Mon, 13 May 2024 09:54:07 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1715608436; x=1716213236; i=stephen.berman@HIDDEN;
 bh=sMb8MAyxOIIKdXeoMTUpEavQK8aCoMFiDqjaDTjkU2Q=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=Pk40CLOZQTzyjaG/+GDvJ3yuJtPZplmSEAhWqBaH18rXC1bDvcYo+AaxfwJV5WXj
 GOCR+P6wyzXV1ykwl1rNIefZVPsdchzw98zAkp75Yl3oZxCNfJd9m2lrO3w+2f+2P
 qkPXzAJQkLQN7pS3g7w8Ufjgv5E7FcLJenho24NfPkxR8rGLKy6mc+AlQbC/zMWHx
 PVQROviBtIeJ6hGMx1ne8hhtPiynhn2AdxlJIIgWRo8x26QU/Hh7M3GjLIJ7NlEM7
 AAbLAI05cXYg54UwnnK11Xx619xOPS38fHOPMU5t6WWC6+2fAhHSuiVUqogP1N+ha
 zv5PpmaE2Ml+lPkIqA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfs ([94.134.95.151]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MhD2O-1sjgQL3Z4c-00hfIJ; Mon, 13
 May 2024 15:53:55 +0200
From: Stephen Berman <stephen.berman@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Mon, 13 May 2024 09:28:54 -0400")
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
 <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN>
Date: Mon, 13 May 2024 15:53:54 +0200
Message-ID: <87v83h4y31.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:09jy+VBFUXzG7wgDB0RFSCvBvCdi4Vc2EUUFF8b74kVlu8YsfdX
 p4SswbMegrFwqr9hstqmU3ANrJav1I72XLYxMXu6KOL0UQt09AXCQqmWlTxacY57QILEtJw
 Ad0UpdpKXIuUmC9Y0ImF0RUXZ8nlXneludnJlgArKUGyZqxVPQhDF0Qkk89QCL5Sqklfyts
 wdZn+IvO2bRhiSCWJiIgQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:durF7ie02HU=;TttKmhHk3RRRXbKL/Va+CVWLenL
 8Mte5rl2w/9vvkSLnUZqdMLSj7iY6pGt+qSfpoFfozdIZ5dLw5TZvaysf2FBqqlp0b04h8IUz
 gnoaKraCd2OH/7b2QN9AsNaGMyNP8zYWpf40inlbl3hMRWywXIg81Nl8hSz7a004YN0p1uNT0
 E8TuwWVcsw8pKm2UXbsdJasjpYbC/VUeDfyxbUIaPVZsZJAiAlxDj9IXfBo07B4QaceEN+2d+
 yHMgbNb7zyr/kbWkZZqnlp3wSQXj5IldJAJMp05iUcmRPwRj5OvUf7ZYEvKh5Cd8R33Zu0M3n
 wc986XNIS9varnRCJK9xTGx1H1I1rkOZZnyQqRbPQBVWIIdXm0kNrs8B1+sMDy+kPun14Cbpe
 36SHw2YtXg0k6NnT35kFkop6s2sUucJSYv1N6OkzPTnLAeiXgQV5X6AcpPrH/9OcKsrp2PPs0
 iAAiKBbgd8SjK/1h5k4Gu37TVOb3bFlR/4TtSiz+Sot8rJzxQDq5/+nvNJ5PPIKrolmXI6cpb
 ysV9Am2ImNXcdTp3m0M9RyyayVcmmH8cryRNOOqDRU2G0lGZuk8Eadrt6+e0CWiL/XytwBwRp
 qthF07C0LcUFibwE3JMN+sIQW9tLYBldc9EgRp7DYyPVZPVtYFrsLG6cEvhXfjdgwHSXWO1De
 ymtDY51DV5Y2dAAsAx1bV0AAduiJmP1kwQjYLB0ekPNZh/FK9BK1AjICiDrLONWsnDE1gG/vG
 obJy9WIk702dicf77ydbQVtzfrPBd/fgX4iknvus09KWhtf86jVOiJ7wp1WEFK3TBhz1nBqCM
 tDE5N9PXuU9SGIQVrlt7VeThCOYvJj90e/2X3UGAEKHCE=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Mon, 13 May 2024 09:28:54 -0400 Stefan Monnier <monnier@HIDDEN> wrote:

>>> I meant the "too late" insertion of radio buttons into
>>> radio-button-choice widgets (and likewise of checkboxes into checklist
>>> widgets), because IIUC the way this is currently done (by
>>> widget-radio-add-item and widget-checklist-add-item, respectively)
>>> requires that the container widget is already in the buffer.
>>
>> Then maybe widgets which expect to be filled after they're created
>> should make sure they have an additional character at the beginning and
>> another at the end so insertions "inside" don't get confused from
>> insertions "right before" or "right after".

Something like with editable-field widgets (cf. commit 3bff434b8:
"Document need to put some text before the %v escape in :format
string")?  Wouldn't that complicate the display these widgets,
e.g. forcing a corresponding offset of all radio buttons or checkboxes
in order to align with the first one?

> Or maybe `widget-*-add-item` should temporarily change the insertion
> type of the from/to markers?

What do you mean by "temporarily"?  Recall the problem that prompted my
OP in this bug is the misfontification of the first radio button in a
deactivated radio-button-choice widget, and the deactivation can happen
any time, long after the widget and its children haven been created.

Maybe it could be left up to the deactivation code to ensure that the
radio-button-choice widget's :from and the :from of its first child
coincide when deactivation (and accompanying fontification) occurs, and
then reset the previous values afterwards.  Though that seems pretty ad
hoc... (and would resetting the :from affect the fontification?)

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 13 May 2024 13:29:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 13 09:29:18 2024
Received: from localhost ([127.0.0.1]:32768 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6Vjx-0001eU-M0
	for submit <at> debbugs.gnu.org; Mon, 13 May 2024 09:29:18 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58484)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s6Vji-0001eH-DS
 for 69941 <at> debbugs.gnu.org; Mon, 13 May 2024 09:29:15 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 85E818092E;
 Mon, 13 May 2024 09:28:56 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1715606935;
 bh=kOMxgBbIje2PcDRBIwAut52C7vixBTzQq91PeRNrvGs=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=fRJk+gXJqb3iCSC8CKOFBW9wTR75fDupBwWCzEiKl2kCINY3hRJnx9CUebfUkufFX
 XEUojRttnU0bFABYA9yawLZzyq0+RSZcV3tZVQSTEQ1xD4vy4Q/PAp7BIJycpraKjc
 MladnmbAQtJ+4lJLUmsmvfYK1PXKiDhwNjEiCwrGs/N1njNxAjG7IUxWQ8w5G/6b85
 12jiBCw2yNEKF51hp2XktlLQHb62/nmQd7X0S994Ta84XtKniCWnlvvz0gB4RsmnoH
 ycCQ89CmckXgOXFqBU3tOcFAdId7Q1yBVcqU9oPOd8y14GdzqBqmWV+/QA5A/2Cbit
 l4G25PL3NqIPA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5868E80822;
 Mon, 13 May 2024 09:28:55 -0400 (EDT)
Received: from pastel (unknown [45.72.201.215])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 373701203DF;
 Mon, 13 May 2024 09:28:55 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Mon, 13 May 2024 09:26:31 -0400")
Message-ID: <jwvpltpvo2g.fsf-monnier+emacs@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN> <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
Date: Mon, 13 May 2024 09:28:54 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.038 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> I meant the "too late" insertion of radio buttons into
>> radio-button-choice widgets (and likewise of checkboxes into checklist
>> widgets), because IIUC the way this is currently done (by
>> widget-radio-add-item and widget-checklist-add-item, respectively)
>> requires that the container widget is already in the buffer.
>
> Then maybe widgets which expect to be filled after they're created
> should make sure they have an additional character at the beginning and
> another at the end so insertions "inside" don't get confused from
> insertions "right before" or "right after".

Or maybe `widget-*-add-item` should temporarily change the insertion
type of the from/to markers?


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 13 May 2024 13:26:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 13 09:26:46 2024
Received: from localhost ([127.0.0.1]:60988 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6VhW-0001da-3b
	for submit <at> debbugs.gnu.org; Mon, 13 May 2024 09:26:46 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19164)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s6VhS-0001dU-6E
 for 69941 <at> debbugs.gnu.org; Mon, 13 May 2024 09:26:44 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2A1598092E;
 Mon, 13 May 2024 09:26:34 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1715606793;
 bh=8aTCCNRrucjs028dZYSYZiNG7ng8Et1O7O6ccbpeioY=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=oQTdB9k4sPVEoN6ZtehrDOR7eRAV6HBWVg3rlS/mpuFi5fNKdmN/T/kyGC79raZpV
 DJbT6EuMdiUw4k7707dxBnpjwpoPxdHCq8IvMZ5QaMBZoyK5MSc2+E6A1QOCNIMJf6
 jBMFBSeNFBEOrPwtpNwUXHGeQyvs9FRinBa2ASnnxG/n3H4B12LIebtywrW0+d9ujv
 My4xemxG5YBaxL0mWoYakxkfw+O82aQDITEIbC8pGU6h8EUEesJ88KAz2bETz6kfYg
 RO+cPuPBbeu5V3vV/O71H4FK+c6dQDkLg3E8pcu6J3orQgZdYlW1q/KXZZcziKGJUy
 q6yl75SLXHYdg==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0E94E8064F;
 Mon, 13 May 2024 09:26:33 -0400 (EDT)
Received: from pastel (unknown [45.72.201.215])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DCB1012012E;
 Mon, 13 May 2024 09:26:32 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <87zfst4zuh.fsf@HIDDEN> (Stephen Berman's message of "Mon, 13 May
 2024 15:15:50 +0200")
Message-ID: <jwvv83hvo8f.fsf-monnier+emacs@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
 <87zfst4zuh.fsf@HIDDEN>
Date: Mon, 13 May 2024 09:26:31 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.038 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>>>> Could it be that part of the problem is that the insertion of
>>>> a radio-button widget into a radio-button-choice widget is done "too
>>>> late", i.e. after the radio-button-choice widget has been printed?
>>> To avoid this I suspect that the radio-button-choice widget would have
>>> to be redesigned, and also the checklist widget, which has a similar
>>> issue.
>> What does "this" refer to?"
> I meant the "too late" insertion of radio buttons into
> radio-button-choice widgets (and likewise of checkboxes into checklist
> widgets), because IIUC the way this is currently done (by
> widget-radio-add-item and widget-checklist-add-item, respectively)
> requires that the container widget is already in the buffer.

Then maybe widgets which expect to be filled after they're created
should make sure they have an additional character at the beginning and
another at the end so insertions "inside" don't get confused from
insertions "right before" or "right after".


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 13 May 2024 13:16:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 13 09:16:09 2024
Received: from localhost ([127.0.0.1]:60942 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6VXA-0001KQ-Nb
	for submit <at> debbugs.gnu.org; Mon, 13 May 2024 09:16:09 -0400
Received: from mout.gmx.net ([212.227.17.22]:45875)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1s6VX7-000116-8u
 for 69941 <at> debbugs.gnu.org; Mon, 13 May 2024 09:16:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1715606151; x=1716210951; i=stephen.berman@HIDDEN;
 bh=xHHmNok33dnN9/8J2MqPjm1ITjpX9hBn1arXGf3YONE=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=LO/IISNfP+U1V0FGic/oG0IFUHjBNzXEH7mBbRwQ7RjDTBkWfZLQO3BgLX9x70bn
 cqJfbe8z3jr87M/OKxVyaJUzRu4Gc2y7gVG5zCdZJfDhIUipX6xW7BKIFI8ipA5e0
 xRUuuz55/8YomfgmuSjcRNAY8lKizZw9oYkz5GjfasuRX362CilYiP7HJF2as2axI
 tOb9B/Hne2UuyHLDKCQmcOxvqbnmXirGYo+C1duzclItwwLbmqPhodIU1PLSoA2UT
 +snD5E8n5ahwkU80UK0slyQljzjTh5YCssK6kNbJtjAiyx9Mb51NayHeuV108fo1g
 ZEmuTiEZdnMVUyIYwQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfs ([94.134.95.151]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N17UQ-1sYnpV0Idm-011ki7; Mon, 13
 May 2024 15:15:51 +0200
From: Stephen Berman <stephen.berman@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <jwvo79awixb.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Sun, 12 May 2024 22:22:38 -0400")
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN> <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
Date: Mon, 13 May 2024 15:15:50 +0200
Message-ID: <87zfst4zuh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:5JPCIr+VI+9QCRef7RarPQCWkjIEh0ITpZghI8RNmqMlxDeWlvO
 mbRvepoedzQGVBcUOOC3fsN7YxzpQlb+oxxKHdNz/2c+7ges4E+TKJm9GuSpnMjKoJ6STjo
 tIQwu+bgumB2z99V0ZBbKmALKsOXuA0xp1wxX/YIK10HNhM5ILpML4BkWmefkxlTaB17G0x
 VeB2cfDsl7oI0Ul/Vvxbg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:GljMnP3eOaE=;OwqWkdzqdws5VUYqXXILHcbNu59
 wM8iM9f807TyDCUOn/Qx1JRNQgvfaOJrhMmnxyE25GgPtQl54fKxB8zi5ocVVVrKT6v0IZHVs
 Jk95kCPovV9UoZ3SirP7dgVb0/Dp71TjYhv4ZKUKFLbr/6XzzoxfnZGdhW+e6z4mj42S6hdrq
 Svg9bfrWQlM2SEkHg5dbctAxGalWAWTg+JMDuGfD/iQoOQeT7ctkwCDsodDPvJvRgHr8Qm9b2
 k2FE8CJKVYqw4ZFUm7sKu5nmep/Cmo71+5x0q1WVTAcxwQU9XLYFmCPY8xL4crLrh/qYuoubb
 zl8ib3BqNVIoFuIrtB+s9iF/73TbdDNequ+VO/DDOla/6wT/WB8v0KFNkmUeTa9RIdWcPnZ/w
 YIhcH1hv+n29nXIQ9KgwjoOWYRx8tcMp1sZKbyRF/QZs4D9dxIHJeM6WAK56gvd5SdprrFDkk
 OS1NUF8e61bL/e0IzCFYm4rP6geo/OweuzPLW7bKzSmShjYxcNdkbCZa41FXO6KA3/03U0/m+
 XUkKvQ9h6lP2S2QltYmufvy44zUybTUuXRUvRhU25ZBasa/uXPQPOtWbH68MDjFC3YJ15B7Rr
 WKxIlokulQYsljX0pQGKYVwDnLtVdwU3d+l9X1Tb/gJ+eANCGGePOr1PATL4qvgX557dxnmuK
 8G4BEZYHeC6A/l2AgWf4hz99NSS3eBxasFPlIQ6tWiUeJafWa7294Km08fldPaXeycAX9rVXx
 CwOEFNKEqgeOBZJMIVCjI6IJqZ0HGNZGg2XHohhw2+hDY4lTtOcb0KkH7jd+PiaAOEGlw8gUo
 eFdOmwLhmKxBF0MARrvax4TYLHd3pjMuEhIuOZqPJ1U14=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Sun, 12 May 2024 22:22:38 -0400 Stefan Monnier <monnier@HIDDEN> wrote:

>>> Could it be that part of the problem is that the insertion of
>>> a radio-button widget into a radio-button-choice widget is done "too
>>> late", i.e. after the radio-button-choice widget has been printed?
>> To avoid this I suspect that the radio-button-choice widget would have
>> to be redesigned, and also the checklist widget, which has a similar
>> issue.
>
> What does "this" refer to?"

I meant the "too late" insertion of radio buttons into
radio-button-choice widgets (and likewise of checkboxes into checklist
widgets), because IIUC the way this is currently done (by
widget-radio-add-item and widget-checklist-add-item, respectively)
requires that the container widget is already in the buffer.

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 13 May 2024 02:22:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 12 22:22:49 2024
Received: from localhost ([127.0.0.1]:57722 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6LKy-0004wT-Vg
	for submit <at> debbugs.gnu.org; Sun, 12 May 2024 22:22:49 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32539)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s6LKv-0004w9-W4
 for 69941 <at> debbugs.gnu.org; Sun, 12 May 2024 22:22:48 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C35F0808BA;
 Sun, 12 May 2024 22:22:39 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1715566958;
 bh=JLP9ciAKiPh3ZKZTowUIs89NaDy/yNc5vgO1yA9c4y4=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=G0jo4ktK7tsILehu6342V4TitF8CwBoDbfx8T2fX82WHvYsKZJi26mFbNdNTzUpzV
 lHqWeDvfzZpVbUp3tmr53sctb2EyMZ1/L2KsNhSvibOi6UTmCbuAaTB71PG0n8Lt8K
 AbNXo7E2SmqtCeZwgtUWo5kKBUbrlSQu8z/c9nhDDm2vFvn+fQuB5Kr6fzo9gAUtUo
 68tGVQCgLhL49luhddIB4bpw5YLMstEzKU3HsL4SJvcWGuWvBYwiMWBTHR6nuZ3zKR
 DuBeF+Zyu9Xp01QdhJ+5da6jbpzwEzANNppozIm1t0t0h4ATpmVO3Xhrg1X3t5+GAf
 RkfEJeGIv1WZw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B56538060F;
 Sun, 12 May 2024 22:22:38 -0400 (EDT)
Received: from pastel (unknown [45.72.201.215])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 921E2120480;
 Sun, 12 May 2024 22:22:38 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <87o79c8n60.fsf@HIDDEN> (Stephen Berman's message of "Sat, 11
 May 2024 15:59:19 +0200")
Message-ID: <jwvo79awixb.fsf-monnier+emacs@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
 <87o79c8n60.fsf@HIDDEN>
Date: Sun, 12 May 2024 22:22:38 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.038 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> Could it be that part of the problem is that the insertion of
>> a radio-button widget into a radio-button-choice widget is done "too
>> late", i.e. after the radio-button-choice widget has been printed?
> To avoid this I suspect that the radio-button-choice widget would have
> to be redesigned, and also the checklist widget, which has a similar
> issue.

What does "this" refer to?"


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 11 May 2024 13:59:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 11 09:59:33 2024
Received: from localhost ([127.0.0.1]:48508 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s5nG9-0007XN-2T
	for submit <at> debbugs.gnu.org; Sat, 11 May 2024 09:59:33 -0400
Received: from mout.gmx.net ([212.227.17.20]:50271)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1s5nG6-0007XH-Cd
 for 69941 <at> debbugs.gnu.org; Sat, 11 May 2024 09:59:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1715435961; x=1716040761; i=stephen.berman@HIDDEN;
 bh=4CWIvq0+5jFtY1bkwIFLhbH8MYnh0cJ0t7gxigDf8Jw=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=cF+YoAOkBh4HtLSMHNTWp3lnrE+8RvHQwgLPqveVSfH4oUFWDLcQsEd4JlyQtk7f
 v6nqLCTGLeTYr38QovrxV/2u1FY9BqCDHzEawPKwvJd2sr+27kJR6oIj3Do4mJyfA
 MI5XbwlbrDvzx2DhPLrNO1g32FFow8zfwpRhAsZPpkDnsgJI6KUOg/xJcGuvYLWc8
 kms24VaMhus5tMqjTYwpcFR9okplPyDYZvsYXT9OFEkfDnQWFSDnAY7wwbI36YdGU
 ERkB4Psxur7VKgNUYMcKhu9dUE5Gp7vY5ROiItHyOJTYKm/ENltukfaOz+M4J5fgE
 kjeiI++ZwBbyoXYMSg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfs ([88.130.48.180]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MWzjt-1s7aXh3Gx7-00VzU5; Sat, 11
 May 2024 15:59:20 +0200
From: Stephen Berman <stephen.berman@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <jwvv83nytb9.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Thu, 09 May 2024 10:15:29 -0400")
References: <87h6gynx49.fsf@HIDDEN> <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
Date: Sat, 11 May 2024 15:59:19 +0200
Message-ID: <87o79c8n60.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:8ie99ZWOvcUn5GPLZdcOYD/6o42APt1/03c43jjTe3KLyrhY7v8
 FlrvJyjx4eQniC9o5aNMjB0PrYKwMcJZ6HTF3XE/sXKyWIZRoJRJI8USPASrPLEJovucN7K
 3htt+Dy3etAScikaGlr32cA8TYkkDldvbpgkqhO0TrRN2ZBQXVszYelsTijlO24gbqhC8Wc
 ul5OoNVxOUhyGwfKyL6qA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:eUrLRlKWbUU=;INLAThrPJtfrabT7upcnIeXmKt1
 /RIfNZEvJQpBk9U1LR2bqPK5YyzRxAflcnWLJku0M+aWkqhN5UsoR3g0kgdC0iPr2d7ePpd7C
 GcYXj5COm9D9+ECdntujiw+j34EKYsfFNbqeyjI6fPt71+5BDvaABpAetV5/BmmOifM90KuLO
 RHHPHZWGR27zni0i2SBMWsw12yN0auBQBH32ydGA9JL9tZ+32U96UEeChgBis2+I+lRoeYY6I
 egBmgnWAKxrpUIl7TtCW069sdMg9rbX58O/Ha5sFvAzcrlIuijAdxHT+q2yigxEegIDaq8L8d
 V7K2buPt/JPhVP+qt8o24vUIbuhJqkxf3GLAUeB0ZHnJMGz+4/0cCS3Md8pc+lRtAagYk6dIN
 nHEfGlupdPfQV/vKzw0vQfGtEciA94bN2E3RwTjun0Qv1g7OzrYZ8/xn5mmaAK4rITnWUcdwT
 Oiomjc39bNHK4oZ+QYmqRdNgEpIV50agsXhoS/bQBhBPAjvXRBxEo9zuiSZWqLXTkXlUoAnnH
 2rBsV+FGf7nItx1J2JDIt/4LI+b/erd9CMI1hhEO/kLjeuQivKGBAAZnU7asJ1ZzfVdfKGU0c
 HoTtjbtCqg+4MPHMGFjewGJlMJPpM+LBoj/u48zo0mCxoM3noyoRtJ2WGR68HtKxyl4qsO8k2
 xd6axlufyZUmM/u8K55Z2Fi3p6gZfkqE8/bDZAnplr0DuWqhgXhA3a1AaqUXnzx151lvD76ja
 uQVHli81kuvatn1/HDCx/Z6Mgf62kCwrJGXGmntEJ0/S6m8wGWWNJHfDs5Tord3BTo+nBWqLD
 L/yFJDEWmiQZogTEz2r+XXBYn5gq80qB1/HhA2NwSbirI=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Thu, 09 May 2024 10:15:29 -0400 Stefan Monnier <monnier@HIDDEN> wrote:

>> I investigated the history of this code, and while the value t for the
>> marker insertion type was used in the initial commit, it was changed to
>> nil in commit e0f956935, with the message "Insert new text at the :from
>> marker _after_ the marker, not before it."  But 18 days later it was
>> changed back to t in commit 3bff434b8, that also added "Document need to
>> put some text before the %v escape in :format string" of editable-field
>> widgets.  (I looked at the bug-gnu-emacs and emacs-devel mailing list
>> archives but found nothing relevant at the time just prior to these
>> commits.)
>
> I'm really not familiar with the widget code, but looking around that
> code I see that we have
>
>        (set-marker-insertion-type BLAfromBLA t)
>        (set-marker-insertion-type BLAtoBLA nil)
>
> at various places, and I think that makes a lot of sense when you
> consider that we don't want text inserted right before or right after
> the widget to suddenly become part of the widget.

Yes, Mauro Aranda's response to my OP also made this point, though not
so explicitly, so I think it sort of went by me, but after reading your
comment, I did some further testing and, indeed, my latest patch (I've
only tested that but the other versions I've posted should not differ in
this respect) does result in text inserted directly before a checklist
or radio-button-choice widget being after the widget's :from marker,
which makes the text get covered by the widget-inactive overlay, which
it should not be.

So it seems that either my patch is not the right fix for the
fontification problem, or it has to be accompanied by further
adjustments.  I've briefly looked at the latter approach, thinking that
using insert-before-markers might help, but my attempts have failed so
far.

> But OTOH while "printing" the widget itself, we'd want the exact
> opposite (i.e. nil for from and t for to).
>
> Could it be that part of the problem is that the insertion of
> a radio-button widget into a radio-button-choice widget is done "too
> late", i.e. after the radio-button-choice widget has been printed?

To avoid this I suspect that the radio-button-choice widget would have
to be redesigned, and also the checklist widget, which has a similar
issue.  Although, it seems that a viable alternative to using checklist
widgets may be simply to use checkbox widgets, as e.g. recentf-edit-list
does.  But radio buttons have to be grouped, since only one per group
can be selected.  How to do this without using an enclosing widget like
radio-button-choice, which by definition has it's own :from and :to
properties, I don't know.

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 9 May 2024 14:16:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 09 10:16:08 2024
Received: from localhost ([127.0.0.1]:55521 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s54Z5-0003Nh-Nl
	for submit <at> debbugs.gnu.org; Thu, 09 May 2024 10:16:08 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19493)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s54Z1-0003NA-37
 for 69941 <at> debbugs.gnu.org; Thu, 09 May 2024 10:16:06 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2FC58100061;
 Thu,  9 May 2024 10:15:31 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1715264130;
 bh=teBw9Nff12NRjd1WqE7bOqaZPXFD3kgQI0DBjEwLE2s=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=gLbyBGDANenePv9EhHh0+fbRWS1D4IiNIjsFJkUlNYWUKv2X3PHPTad5GI8NHedZt
 M4Pg/au2GhqpwC40GMRU2fHoRdGbHzDlgAd6QB1/mlikV46pSgi+9sckFesw2L3f5p
 fS1hGutRDt3yz8pgNgxOwyuH1/DJeoOubBik34ukiQVCH7xH8QOSo6xsGlUNvsx0Pm
 lamVnypgDaI5KzSD+8KXXc/urv5L4G+3R0fFnSZTrrLpQjXtag/FKIZWpEriwfX9Y3
 h37dYcGJvB7N41o0e2x5K2L5jJuGCQwTsulbP7YJtvESIJH2ArPM4c9EDfTb3SCneL
 vZY+v6KXbSEeA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0CDA7100035;
 Thu,  9 May 2024 10:15:30 -0400 (EDT)
Received: from pastel (unknown [45.72.201.215])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DD92D120352;
 Thu,  9 May 2024 10:15:29 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <87h6gynx49.fsf@HIDDEN> (Stephen Berman's message of "Fri, 22 Mar
 2024 15:45:42 +0100")
Message-ID: <jwvv83nytb9.fsf-monnier+emacs@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN>
Date: Thu, 09 May 2024 10:15:29 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.003 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> I investigated the history of this code, and while the value t for the
> marker insertion type was used in the initial commit, it was changed to
> nil in commit e0f956935, with the message "Insert new text at the :from
> marker _after_ the marker, not before it."  But 18 days later it was
> changed back to t in commit 3bff434b8, that also added "Document need to
> put some text before the %v escape in :format string" of editable-field
> widgets.  (I looked at the bug-gnu-emacs and emacs-devel mailing list
> archives but found nothing relevant at the time just prior to these
> commits.)

I'm really not familiar with the widget code, but looking around that
code I see that we have

       (set-marker-insertion-type BLAfromBLA t)
       (set-marker-insertion-type BLAtoBLA nil)

at various places, and I think that makes a lot of sense when you
consider that we don't want text inserted right before or right after
the widget to suddenly become part of the widget.
But OTOH while "printing" the widget itself, we'd want the exact
opposite (i.e. nil for from and t for to).

Could it be that part of the problem is that the insertion of
a radio-button widget into a radio-button-choice widget is done "too
late", i.e. after the radio-button-choice widget has been printed?


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 9 May 2024 07:22:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 09 03:22:20 2024
Received: from localhost ([127.0.0.1]:53594 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s4y6d-000776-Ma
	for submit <at> debbugs.gnu.org; Thu, 09 May 2024 03:22:20 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37984)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s4y6b-000770-Ia
 for 69941 <at> debbugs.gnu.org; Thu, 09 May 2024 03:22:18 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s4y66-0006qI-5Z; Thu, 09 May 2024 03:21:46 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=5wDcDu3+Mcx9f5e/KrXtwAESpPqMX7T/O8Ihf+d2F0Q=; b=UPbEId32X0MVTvK5C7HJ
 LGvscj8yJtHIUSVkLPtQEim0uMuGLQFFhFk/zY3EhbGH/FsQLh+piiMSljzG83Y84UxsT+Gul/Hke
 tKEomFgrtq6+0Xpv96I8PJN5eov1t3w4RnFNGxTunL8WcMAgr6RCSN3nupaLQgoc7JDuK8SLAda9m
 pfvuh3HbWH+SBwSUSURvbLKqVfu0VYLKOifLLoEYZh+CiUK7BUeg+Dl2q8rnoKVMkJs3bg5grwON3
 KT096LWPQnhTHDD3iIaaP/wax3XcrrxzPs15aLqDwFJMkcDgiHr8Klv/Ua5BP8mY/w76tCTF4U+Jf
 4M9/dii6t1yxtA==;
Date: Thu, 09 May 2024 10:21:44 +0300
Message-Id: <861q6b8n7b.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stephen Berman <stephen.berman@HIDDEN>
In-Reply-To: <87plucl2bh.fsf@HIDDEN> (message from Stephen Berman on Fri, 26
 Apr 2024 14:45:54 +0200)
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
References: <87h6gynx49.fsf@HIDDEN> <865xxe1dwd.fsf@HIDDEN>
 <51c20b56-4b82-4f5c-9559-cdbd0146df22@HIDDEN>
 <87wmprqxj3.fsf@HIDDEN> <8734s5w1mf.fsf@HIDDEN>
 <941f6565-203b-47bf-82a9-2bb7b0788b6a@HIDDEN>
 <86h6fyewgq.fsf@HIDDEN> <875xwehjty.fsf@HIDDEN>
 <87wmoqlcso.fsf@HIDDEN> <87plucl2bh.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, maurooaranda@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ping!  Any comments?  Or should we install the proposed patch?

> From: Stephen Berman <stephen.berman@HIDDEN>
> Cc: Mauro Aranda <maurooaranda@HIDDEN>,  69941 <at> debbugs.gnu.org,
>   monnier@HIDDEN
> Date: Fri, 26 Apr 2024 14:45:54 +0200
> 
> On Sun, 21 Apr 2024 21:45:59 +0200 Stephen Berman <stephen.berman@HIDDEN> wrote:
> 
> > On Thu, 18 Apr 2024 15:38:33 +0200 Stephen Berman <stephen.berman@HIDDEN> wrote:
> >
> >> On Thu, 18 Apr 2024 14:33:57 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:
> >>
> >>>> Date: Thu, 18 Apr 2024 07:18:29 -0300
> >>>> Cc: Eli Zaretskii <eliz@HIDDEN>, 69941 <at> debbugs.gnu.org,
> >>>>  Stefan Monnier <monnier@HIDDEN>
> >>>> From: Mauro Aranda <maurooaranda@HIDDEN>
> >>>> 
> >>>>  > To fix this bug, do you have a preference between this patch for
> >>>>  > widget-specify-inactive and the attached patch for
> >>>>  > widget-default-create?  Or do you have a better fix?
> >>>>  >
> >>>>  > Steve Berman
> >>>> 
> >>>> I don't really have a better fix.  I mean, ideally, we'd find the reason
> >>>> why the setting behaves differently for the radio-button-choice widget,
> >>>> and only for the first one in a radio widget, as it seems to me. But
> >>>> I'll need more time to be able to look into that.
> >>>> 
> >>>> That said, if Eli is OK with installing a minor hack (with a FIXME,
> >>>> please), I don't have problems.  And since it's a hack (and hopefully
> >>>> temporary), it's better if we keep it at widget-default-create then.
> >>>
> >>> My opinion doesn't matter much in this case.  If you two agree on a
> >>> solution, feel free to install it, even if it is not 110% clean.
> >>
> >> I've been using the patch for for widget-specify-inactive in an
> >> application I'm developing that exercises radio-button-choice widgets,
> >> but I'll switch to using the patch for widget-default-create instead.
> >> I've been encountering inconsistent behavior in combination with the use
> >> of widget-unselected face that I haven't tracked down the cause of yet.
> >> I don't expect using the patch for widget-default-create will improve
> >> this issue, but I'll find out.  I also plan to test that patch in
> >> combination with widget-unselected face with checklist widgets, which my
> >> application currently does not use.  I'll report back here before
> >> committing the patch for widget-default-create (or something else,
> >> depending on the outcome of further testing).
> >
> > Just a brief status report: My testing does indeed indicate that the
> > fontification problem with radio-button-choice also occurs with
> > checklist widgets, though the pattern appears not to be identical; I
> > need to do more testing and debugging.
> 
> Further testing confirms that checklists are subject to this problem, so
> I've added them to the attached patch.  The rest of this post reports
> results from and speculations based on my debugging efforts, which
> remain somewhat inconclusive.
> 
> According to my tests, checklists and radio-button-choice widgets do
> indeed display the same problem with the first checkbox or radio-button,
> respectively: if it's selected and then the parent widget is
> deactivated, then the button/checkbox incorrectly does not have
> widget-inactive face.  I think the reason for this is that selecting
> inserts "[X]" for the checkbox and "(*)" for the radio-button, and since
> the parent widget's :from property has marker insertion type `t', its
> position advances to after the insertion (I guess this is because the
> starting position of the first checkbox/button coincides with the parent
> widget's :from), so the overlay with the widget-inactive face beginning
> at :from does not cover the checkbox/button.
> 
> But checklists and radio-button-choice widgets differ when a non-initial
> checkbox/button is selected.  With checklists, multiple checkboxes can
> be selected, and selecting the second checkbox does not advance the
> parent widget's :from position, unlike with radio-button-choice widget's
> when selecting the second radio-button, as I reported in my OP.  I think
> this is because in radio-button-choice widgets only one radio-button can
> be selected, so selecting any one triggers the :from marker's advancing.
> I could not verify this hypothesis through debugging because I was
> unable to find out exactly when this happens.  The marker advance is
> done in the C code, I think at adjust_markers_for_insert in insdel.c; I
> set a gdb breakpoint there and this triggers when I select a radio
> button, but it's too early: a lot happens in wid-edit.el between
> selecting a button and the selection becoming visible, and the
> breakpoint triggered so often that I gave up.  Is there a way to make a
> breakpoint in the C code trigger only when a specific part of
> wid-edit.el is evaluated?
> 
> Nevertheless, by assigning the :from marker the insertion type nil in
> widget-default-create when the widget is either a checklist or
> radio-button-choice, does result in the correct fontification of the
> first checkbox/radio-button in all tests I've conducted with varying the
> selection.  And conceptually it seems to me correct that :from should
> not advance with these widgets: selecting a checkbox or button is
> operationally quite different from inserting text (e.g. in an
> editable-field widget), even though the implementation technically
> involves insertion.  So I think the attached patch is at least a viable
> stopgap, until a better (or at least less ad hoc) fix is found.
> 
> Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 26 Apr 2024 12:46:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 26 08:46:46 2024
Received: from localhost ([127.0.0.1]:34293 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0KyK-0002Ua-My
	for submit <at> debbugs.gnu.org; Fri, 26 Apr 2024 08:46:46 -0400
Received: from mout.gmx.net ([212.227.17.22]:53055)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1s0KyB-0002Rh-3Z
 for 69941 <at> debbugs.gnu.org; Fri, 26 Apr 2024 08:46:34 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1714135555; x=1714740355; i=stephen.berman@HIDDEN;
 bh=AnRUioFZuIh5w5N8f0TgiKqr3A4B/BEJO2TwQ2vO25E=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding:
 content-type:date:from:message-id:mime-version:reply-to:subject:
 to;
 b=Ubd8UYNidzZFlesjnsxoIMqYBbepezqUedivCOrIYi+7GnWE62JOHMjSlE6S8Ix/
 5VS65GCt3RUWc0voNHQ9FKQ/gjm5qLp5WQWYwjknZxi9S8ufsDqY7FxlfRNvex1wD
 9588vhVtRDohs/fpjgr1dxAOxLneKCl2ai5dkZVBWTGqcMvTY1Fa0nK0ZS26n1tgn
 o8Fbgr2YXaLr9/w6A67ZyYbiDHlvCIPQrgUN7Kx0ZXLIOD7hYz/86GqTeTOm7fQXq
 lAdDCqspCQbOC5apT8MUGyLUyY207zT6Ft0koo9kZOU8SAzkFF+Gs+5CKLTIfssFJ
 HQwAl8KDyv+dn5gAtA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfs ([94.134.94.5]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MBDnC-1rpreH2npW-00Cfof; Fri, 26
 Apr 2024 14:45:55 +0200
From: Stephen Berman <stephen.berman@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <87wmoqlcso.fsf@HIDDEN> (Stephen Berman's message of "Sun, 21
 Apr 2024 21:45:59 +0200")
References: <87h6gynx49.fsf@HIDDEN> <865xxe1dwd.fsf@HIDDEN>
 <51c20b56-4b82-4f5c-9559-cdbd0146df22@HIDDEN>
 <87wmprqxj3.fsf@HIDDEN> <8734s5w1mf.fsf@HIDDEN>
 <941f6565-203b-47bf-82a9-2bb7b0788b6a@HIDDEN>
 <86h6fyewgq.fsf@HIDDEN> <875xwehjty.fsf@HIDDEN>
 <87wmoqlcso.fsf@HIDDEN>
Date: Fri, 26 Apr 2024 14:45:54 +0200
Message-ID: <87plucl2bh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:WKp7GSBn+Q1oEf6ok4wUb7eDgDyfaDIrqU4GZV90Os4ls1qtmuH
 zauhslO0y5An4yVCfgbFctauZAzSC2mccWzuXeMJNz7GPcx4Y1JHBTlgenJwWpz4FTYrz2s
 ISYjLAoz/lrGpXRgT8Lc/tvprTEjqsoghP2YmzJcthNobedmYQxH0AhURPqzLI1KAEKYrZZ
 KcdqlplE+UkdrLpEGHFmQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:QoH3/B5O/1M=;UkM2oqKni68JhnFTiHwI6/l5SgI
 6pXqSFo+9ecYZlH9yJHPrwvILXrQkL44Wq6yM05xHpqn1yOd+Hno5oLQg0svm/ihGFYjMn55o
 0Mbr5qBTDcfhEGrP1EtaRUQSCYxrRWKE7MAUiw7ziQ58AKabE8zzHdeQTDtG6h76UVcKZ4tsj
 bo1jLf9bTnhsyi2BQqKpPW2h83RvPAx8R+q+nr4Niof+1kSCSFGb6UjrwoYAx1OdBg+utaIet
 TCmjthj9ZkH3zOjylxcU8ZQyucwNktBnBmGFNVJIUr3ulR44T/w5Y3GkknFWmUIbIKJZz9w3e
 GQiivyt/gPVdMKLUXkaJyPqDDBLaVu9sepBUrsVLdLkSuA8QOK9BCeK40JofwwE9NWyrdPpWs
 l59xd1tb64GvGCJWPQqHTmqDbliIrDJi+rVVhWgJQmhn/7BOBPfeVHfLPg9q/ONqjm9FWwszp
 Gi/kK48qnygtrINFm6U6iNrTknnKAn1z1EkRWz4MI7th/2JwMXcd/DB9Azo3Px6NTJc8EQHtr
 s8SdiN5ohai6lkgpBI4fsId/HndSmrf1E2GxzNt96RZub2IqWoBx5fUFISklnFu4zJ8Pl07hH
 LSvnIoK0HWYDLZaznE/2aWm3B+oRi1bdi9BweOv3zHdlK3C3HI8QW60Of2ZwskBa5v1loNmgt
 MwcwI409Fy+4Jxl/ZRGbsq8bynNweoWl6WTJY4OrsFJHZczweVS9UKf8nuQGeHVl1+0HH/dus
 Fp51eflHCO8J/kBgcn+UtkPQTq8pm7Op9Xbs24dl0sgBYOpzWeVXdEHmHnK7gzsnf3rWEfHRA
 RFTIPf74mdD8mMX3aBjKPTjbgVEyvlGvmhZ2iBH+byddo=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, Mauro Aranda <maurooaranda@HIDDEN>,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On Sun, 21 Apr 2024 21:45:59 +0200 Stephen Berman <stephen.berman@HIDDEN> =
wrote:

> On Thu, 18 Apr 2024 15:38:33 +0200 Stephen Berman <stephen.berman@HIDDEN=
> wrote:
>
>> On Thu, 18 Apr 2024 14:33:57 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:
>>
>>>> Date: Thu, 18 Apr 2024 07:18:29 -0300
>>>> Cc: Eli Zaretskii <eliz@HIDDEN>, 69941 <at> debbugs.gnu.org,
>>>>  Stefan Monnier <monnier@HIDDEN>
>>>> From: Mauro Aranda <maurooaranda@HIDDEN>
>>>>=20
>>>>  > To fix this bug, do you have a preference between this patch for
>>>>  > widget-specify-inactive and the attached patch for
>>>>  > widget-default-create?=C2=A0 Or do you have a better fix?
>>>>  >
>>>>  > Steve Berman
>>>>=20
>>>> I don't really have a better fix.=C2=A0 I mean, ideally, we'd find the=
 reason
>>>> why the setting behaves differently for the radio-button-choice widget,
>>>> and only for the first one in a radio widget, as it seems to me. But
>>>> I'll need more time to be able to look into that.
>>>>=20
>>>> That said, if Eli is OK with installing a minor hack (with a FIXME,
>>>> please), I don't have problems.=C2=A0 And since it's a hack (and hopef=
ully
>>>> temporary), it's better if we keep it at widget-default-create then.
>>>
>>> My opinion doesn't matter much in this case.  If you two agree on a
>>> solution, feel free to install it, even if it is not 110% clean.
>>
>> I've been using the patch for for widget-specify-inactive in an
>> application I'm developing that exercises radio-button-choice widgets,
>> but I'll switch to using the patch for widget-default-create instead.
>> I've been encountering inconsistent behavior in combination with the use
>> of widget-unselected face that I haven't tracked down the cause of yet.
>> I don't expect using the patch for widget-default-create will improve
>> this issue, but I'll find out.  I also plan to test that patch in
>> combination with widget-unselected face with checklist widgets, which my
>> application currently does not use.  I'll report back here before
>> committing the patch for widget-default-create (or something else,
>> depending on the outcome of further testing).
>
> Just a brief status report: My testing does indeed indicate that the
> fontification problem with radio-button-choice also occurs with
> checklist widgets, though the pattern appears not to be identical; I
> need to do more testing and debugging.

Further testing confirms that checklists are subject to this problem, so
I've added them to the attached patch.  The rest of this post reports
results from and speculations based on my debugging efforts, which
remain somewhat inconclusive.

According to my tests, checklists and radio-button-choice widgets do
indeed display the same problem with the first checkbox or radio-button,
respectively: if it's selected and then the parent widget is
deactivated, then the button/checkbox incorrectly does not have
widget-inactive face.  I think the reason for this is that selecting
inserts "[X]" for the checkbox and "(*)" for the radio-button, and since
the parent widget's :from property has marker insertion type `t', its
position advances to after the insertion (I guess this is because the
starting position of the first checkbox/button coincides with the parent
widget's :from), so the overlay with the widget-inactive face beginning
at :from does not cover the checkbox/button.

But checklists and radio-button-choice widgets differ when a non-initial
checkbox/button is selected.  With checklists, multiple checkboxes can
be selected, and selecting the second checkbox does not advance the
parent widget's :from position, unlike with radio-button-choice widget's
when selecting the second radio-button, as I reported in my OP.  I think
this is because in radio-button-choice widgets only one radio-button can
be selected, so selecting any one triggers the :from marker's advancing.
I could not verify this hypothesis through debugging because I was
unable to find out exactly when this happens.  The marker advance is
done in the C code, I think at adjust_markers_for_insert in insdel.c; I
set a gdb breakpoint there and this triggers when I select a radio
button, but it's too early: a lot happens in wid-edit.el between
selecting a button and the selection becoming visible, and the
breakpoint triggered so often that I gave up.  Is there a way to make a
breakpoint in the C code trigger only when a specific part of
wid-edit.el is evaluated?

Nevertheless, by assigning the :from marker the insertion type nil in
widget-default-create when the widget is either a checklist or
radio-button-choice, does result in the correct fontification of the
first checkbox/radio-button in all tests I've conducted with varying the
selection.  And conceptually it seems to me correct that :from should
not advance with these widgets: selecting a checkbox or button is
operationally quite different from inserting text (e.g. in an
editable-field widget), even though the implementation technically
involves insertion.  So I think the attached patch is at least a viable
stopgap, until a better (or at least less ad hoc) fix is found.

Steve Berman


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment
Content-Description: widget-default-create patch

diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index dc481d4d0a5..9304002ff52 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1757,8 +1757,16 @@ widget-default-create
        (goto-char value-pos)
        (widget-apply widget :value-create)))
    (let ((from (point-min-marker))
-	 (to (point-max-marker)))
-     (set-marker-insertion-type from t)
+	 (to (point-max-marker))
+         ;; Advancing the `:from' marker of a checklist or
+         ;; radio-button-choice widget on selecting a checkbox or a
+         ;; radio-button, which inserts "[X]" or "(*)", can result in
+         ;; misfontifying the first checkbox (bug#69941).  To ensure
+         ;; correct fontification, assign `:from' the marker insertion
+         ;; type `nil', so it does not advance.
+         (from-mit (not (memq (widget-type widget)
+                              '(checklist radio-button-choice)))))
+     (set-marker-insertion-type from from-mit)
      (set-marker-insertion-type to nil)
      (widget-put widget :from from)
      (widget-put widget :to to)))

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 21 Apr 2024 19:46:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 21 15:46:31 2024
Received: from localhost ([127.0.0.1]:44555 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ryd8v-00025v-7u
	for submit <at> debbugs.gnu.org; Sun, 21 Apr 2024 15:46:30 -0400
Received: from mout.gmx.net ([212.227.17.20]:43305)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1ryd8s-00024b-0O
 for 69941 <at> debbugs.gnu.org; Sun, 21 Apr 2024 15:46:27 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1713728760; x=1714333560; i=stephen.berman@HIDDEN;
 bh=O/z8MDbK6Q3B+E63x5sUyRMlqRh/MiPB4wye1dq2ALA=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=DWK7bHNjglCRKU4AqVP8ltnrdzM1yc1M/U/xUnc2n8G/APD8qXVJUCAR0/aRBeHu
 3hLMB+kNN8HLl9ueXzk/0D/o6RD/a8eAUxNEPn7ErkUqbtSrT2DCBs1G1RgOTovwN
 i5fYBZ9h0uf+cIg8m2YMJvM5okzLIFHomhVHn3UJXXxKYASfb/A7PpjjeNi6BKFAb
 eblVHldqcKNrVz1zWc+rxVJuvaVwRq5v19Q9BNOXVo4/SeA2AtBR9fllE/IX2c7T1
 HyVfAQO9NM17/oOClxvc4enEp4uCOsztqUwKzh6bqk+Ox97+npR5yOY1SqqcBKaFt
 MPShLf19eIvhZojvUQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfs ([94.134.94.36]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MUowb-1s73If1ain-00Qicf; Sun, 21
 Apr 2024 21:46:00 +0200
From: Stephen Berman <stephen.berman@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <875xwehjty.fsf@HIDDEN> (Stephen Berman's message of "Thu, 18
 Apr 2024 15:38:33 +0200")
References: <87h6gynx49.fsf@HIDDEN> <865xxe1dwd.fsf@HIDDEN>
 <51c20b56-4b82-4f5c-9559-cdbd0146df22@HIDDEN>
 <87wmprqxj3.fsf@HIDDEN> <8734s5w1mf.fsf@HIDDEN>
 <941f6565-203b-47bf-82a9-2bb7b0788b6a@HIDDEN>
 <86h6fyewgq.fsf@HIDDEN> <875xwehjty.fsf@HIDDEN>
Date: Sun, 21 Apr 2024 21:45:59 +0200
Message-ID: <87wmoqlcso.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:jJ83ul3GOyZbr5usj2s0HVag3pauoc8palp8lvpxPrgumFJWlxN
 vg1Lw4TE54PIXjw0xGYeYew75a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x2UJeYyN8iQAk=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, Mauro Aranda <maurooaranda@HIDDEN>,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Thu, 18 Apr 2024 15:38:33 +0200 Stephen Berman <stephen.berman@HIDDEN> =
wrote:

> On Thu, 18 Apr 2024 14:33:57 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:
>
>>> Date: Thu, 18 Apr 2024 07:18:29 -0300
>>> Cc: Eli Zaretskii <eliz@HIDDEN>, 69941 <at> debbugs.gnu.org,
>>>  Stefan Monnier <monnier@HIDDEN>
>>> From: Mauro Aranda <maurooaranda@HIDDEN>
>>>=20
>>>  > To fix this bug, do you have a preference between this patch for
>>>  > widget-specify-inactive and the attached patch for
>>>  > widget-default-create?=A0 Or do you have a better fix?
>>>  >
>>>  > Steve Berman
>>>=20
>>> I don't really have a better fix.=A0 I mean, ideally, we'd find the rea=
son
>>> why the setting behaves differently for the radio-button-choice widget,
>>> and only for the first one in a radio widget, as it seems to me. But
>>> I'll need more time to be able to look into that.
>>>=20
>>> That said, if Eli is OK with installing a minor hack (with a FIXME,
>>> please), I don't have problems.=A0 And since it's a hack (and hopefully
>>> temporary), it's better if we keep it at widget-default-create then.
>>
>> My opinion doesn't matter much in this case.  If you two agree on a
>> solution, feel free to install it, even if it is not 110% clean.
>
> I've been using the patch for for widget-specify-inactive in an
> application I'm developing that exercises radio-button-choice widgets,
> but I'll switch to using the patch for widget-default-create instead.
> I've been encountering inconsistent behavior in combination with the use
> of widget-unselected face that I haven't tracked down the cause of yet.
> I don't expect using the patch for widget-default-create will improve
> this issue, but I'll find out.  I also plan to test that patch in
> combination with widget-unselected face with checklist widgets, which my
> application currently does not use.  I'll report back here before
> committing the patch for widget-default-create (or something else,
> depending on the outcome of further testing).

Just a brief status report: My testing does indeed indicate that the
fontification problem with radio-button-choice also occurs with
checklist widgets, though the pattern appears not to be identical; I
need to do more testing and debugging.

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 18 Apr 2024 13:40:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 18 09:40:21 2024
Received: from localhost ([127.0.0.1]:52498 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rxRzp-0000Pj-CA
	for submit <at> debbugs.gnu.org; Thu, 18 Apr 2024 09:40:21 -0400
Received: from mout.gmx.net ([212.227.17.20]:60171)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1rxRyb-0008VL-5D
 for 69941 <at> debbugs.gnu.org; Thu, 18 Apr 2024 09:39:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1713447514; x=1714052314; i=stephen.berman@HIDDEN;
 bh=Bpn+Kzhkp44m5ai9ZJgNnsITBKWvtTK71aFUlc9VEw4=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=VBq1en3vKbRFuA95ZGAGazvv3aMPNuF6/1wQ6VUAQTQLV92svzp3kh5z9/dy9OfF
 hzCU9ywdqO7Vpc3D+GIrw0hbmiY7VeSUStnItICWX5jxNc0SFPSMWNlENdLnibFOC
 5Qj68AISLAGi4PdLd0Qxg/Ub13/Bq0if83WYpu1SK5MjAyBW9JpcxrPyXg/Ejuyba
 4C45vEQuGR9pnd+AUWudY7cejo+k5t/sFapDOUJJR2PjIlkc+t0NV/YSlg2m7rUKw
 7v8ncDpWzoKsRg5geXogBLQcpBLgkeOAhwPAUCpGxpyKaILjYoKmdqDyzfHUlY1Hg
 S84/T6uniKYWlEexGQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfs ([94.134.94.180]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MQ5rU-1sJXBq1yMK-00M1Wk; Thu, 18
 Apr 2024 15:38:34 +0200
From: Stephen Berman <stephen.berman@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <86h6fyewgq.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 18 Apr
 2024 14:33:57 +0300")
References: <87h6gynx49.fsf@HIDDEN> <865xxe1dwd.fsf@HIDDEN>
 <51c20b56-4b82-4f5c-9559-cdbd0146df22@HIDDEN>
 <87wmprqxj3.fsf@HIDDEN> <8734s5w1mf.fsf@HIDDEN>
 <941f6565-203b-47bf-82a9-2bb7b0788b6a@HIDDEN>
 <86h6fyewgq.fsf@HIDDEN>
Date: Thu, 18 Apr 2024 15:38:33 +0200
Message-ID: <875xwehjty.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:OSa99nQB7C6chAmhlLmEJoR/AIPmnIvES01VA6T56FpJSQHPpEF
 EAPp+ukQ+wz1c52/n00YRxVdoIq4F1hR1Mj12jhWQR4rOQrE9Pc9f9te6v+3JNkTlrWZOnz
 kiW03WlM7HkUd9QOZ/8AVX+p4tL5gUb6XVfw8WygJUV/JRuyRwkCjtZQ/Jsi9ZbE4HCcgT0
 qatCw59crWxiYJf+R9LAA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:jDlOLEjLU5k=;XwqRQNiS0x7RzCmIpTy1rEll9Pd
 D5yiFRE1IuvCxJw7xShjKooI80BVuvW8dbaUuKUVfU1Zq7nLzcGIC27fYr47GEgu0Pa7IZcUZ
 /MEgijvGbo3iov2IYu2uGHtpbbGrkAaXVxsNgFiHj8d7OYXc45YwQNvNXwhP9FfUtplFtrGu3
 ZnIfou8i66Bpw68iNDEaAL7dBYtnFFzTIs2iZEwAyPBKpSC1I5FcGGQwSMzsVVDK3FRMpFmEw
 4gbiqAkLt6akzAs8dHgzGfrtA4BNEduIdcpCEwD0L5QA1RpF/N6IZbo+Y+GZt+untHurTGR8Z
 1LWo2jYxAmz/HnB8p0tZtcl242VJgK36olfSGWnhEX47Avpv2LHnEBWHTFFc/j4wCk49hT8RC
 bpMpQhq96ClUljXxLLDG7OMINiKK5fFl8HNc4EkpuUipgN4LHGFEQ6uSL0EuolGIP5fP5cCGc
 PtLPe7SzLSE031Ef4NBqrAuTa8GW+QokVPifPYphSMvfNwDuYOlqsVpJt/bM03xyO8UKy8xJH
 OFDXuuNKE/3VubP8fx6TsJ5mjtIHu/Os6uA7l3B6BuRemyMXJKCgau4wcL7wndvyFawrjYK96
 hkOFdJbXw0nMDLF8FwP79jl48jSbWNnbKnbZJZTKeXb9dlwIFVNRfmMS9EVIsBd4geQySWI32
 OMublfoNgw/094aUBH1bU5ubbRe4gzGZs/rVD8c3tQ+l03nYQKKBRRjCBnjjvOHuxwKGbNzC7
 bl+zyrfrRYkONv4TIhT3r2VR0RBwiqdbgLGUzeWBak0J2woemMuo2QD7EKtVL4GjY7+8X5wEn
 PnMvroYq2A4qMM2GR2rppAV0mLS41M/eSehvQWWVRCFB8=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, Mauro Aranda <maurooaranda@HIDDEN>,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Thu, 18 Apr 2024 14:33:57 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:

>> Date: Thu, 18 Apr 2024 07:18:29 -0300
>> Cc: Eli Zaretskii <eliz@HIDDEN>, 69941 <at> debbugs.gnu.org,
>>  Stefan Monnier <monnier@HIDDEN>
>> From: Mauro Aranda <maurooaranda@HIDDEN>
>>=20
>>  > To fix this bug, do you have a preference between this patch for
>>  > widget-specify-inactive and the attached patch for
>>  > widget-default-create?=C2=A0 Or do you have a better fix?
>>  >
>>  > Steve Berman
>>=20
>> I don't really have a better fix.=C2=A0 I mean, ideally, we'd find the r=
eason
>> why the setting behaves differently for the radio-button-choice widget,
>> and only for the first one in a radio widget, as it seems to me. But
>> I'll need more time to be able to look into that.
>>=20
>> That said, if Eli is OK with installing a minor hack (with a FIXME,
>> please), I don't have problems.=C2=A0 And since it's a hack (and hopeful=
ly
>> temporary), it's better if we keep it at widget-default-create then.
>
> My opinion doesn't matter much in this case.  If you two agree on a
> solution, feel free to install it, even if it is not 110% clean.

I've been using the patch for for widget-specify-inactive in an
application I'm developing that exercises radio-button-choice widgets,
but I'll switch to using the patch for widget-default-create instead.
I've been encountering inconsistent behavior in combination with the use
of widget-unselected face that I haven't tracked down the cause of yet.
I don't expect using the patch for widget-default-create will improve
this issue, but I'll find out.  I also plan to test that patch in
combination with widget-unselected face with checklist widgets, which my
application currently does not use.  I'll report back here before
committing the patch for widget-default-create (or something else,
depending on the outcome of further testing).

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 18 Apr 2024 11:34:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 18 07:34:51 2024
Received: from localhost ([127.0.0.1]:51885 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rxQ2O-00084t-Dy
	for submit <at> debbugs.gnu.org; Thu, 18 Apr 2024 07:34:49 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47552)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rxQ2F-0007xy-Ck
 for 69941 <at> debbugs.gnu.org; Thu, 18 Apr 2024 07:34:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rxQ1w-0003Nb-2S; Thu, 18 Apr 2024 07:34:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=6gSMNO49Wy91JYXLhuIoCpsxx5tAmn04WKSwwZoaUzo=; b=G7nOYS1CVK5Jx5oZwouJ
 X7to6/Qu4KcpqlhyO6CcIB+v8FYwJGTXRZ78OXxAp/TLCdLHpdSOTK1Z/d8lNjp3UPdOYsHCFLddl
 PfMhr5w07xcmK2J32drmwkLKpqhxhkCGQb0GyvAmiwKEF1WMZIQztxdrXw7OBrpcmy72k+SGVEbOW
 ekfyD46YZuzc3Eeres0V3XTkvL1RUcczvOVqGSERuaPEIQfIHsPI2knPyGiqXwDoy/e6/3Ed7+VAA
 lqiSPeqdDEhU51W60PNfskNN5D4Zq8uQ5IPbVjUhU204X2TShm62raHrhTIM12w7KY/mmlVPNKNpy
 mOGDns/T6ZlijQ==;
Date: Thu, 18 Apr 2024 14:33:57 +0300
Message-Id: <86h6fyewgq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Mauro Aranda <maurooaranda@HIDDEN>
In-Reply-To: <941f6565-203b-47bf-82a9-2bb7b0788b6a@HIDDEN> (message from
 Mauro Aranda on Thu, 18 Apr 2024 07:18:29 -0300)
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
References: <87h6gynx49.fsf@HIDDEN> <865xxe1dwd.fsf@HIDDEN>
 <51c20b56-4b82-4f5c-9559-cdbd0146df22@HIDDEN> <87wmprqxj3.fsf@HIDDEN>
 <8734s5w1mf.fsf@HIDDEN> <941f6565-203b-47bf-82a9-2bb7b0788b6a@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, stephen.berman@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 18 Apr 2024 07:18:29 -0300
> Cc: Eli Zaretskii <eliz@HIDDEN>, 69941 <at> debbugs.gnu.org,
>  Stefan Monnier <monnier@HIDDEN>
> From: Mauro Aranda <maurooaranda@HIDDEN>
> 
>  > To fix this bug, do you have a preference between this patch for
>  > widget-specify-inactive and the attached patch for
>  > widget-default-create?  Or do you have a better fix?
>  >
>  > Steve Berman
> 
> I don't really have a better fix.  I mean, ideally, we'd find the reason
> why the setting behaves differently for the radio-button-choice widget,
> and only for the first one in a radio widget, as it seems to me. But
> I'll need more time to be able to look into that.
> 
> That said, if Eli is OK with installing a minor hack (with a FIXME,
> please), I don't have problems.  And since it's a hack (and hopefully
> temporary), it's better if we keep it at widget-default-create then.

My opinion doesn't matter much in this case.  If you two agree on a
solution, feel free to install it, even if it is not 110% clean.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 18 Apr 2024 10:19:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 18 06:19:23 2024
Received: from localhost ([127.0.0.1]:51532 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rxOrI-0007fb-Ec
	for submit <at> debbugs.gnu.org; Thu, 18 Apr 2024 06:19:23 -0400
Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:54766)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maurooaranda@HIDDEN>) id 1rxOqy-0007cb-LB
 for 69941 <at> debbugs.gnu.org; Thu, 18 Apr 2024 06:19:07 -0400
Received: by mail-pf1-x434.google.com with SMTP id
 d2e1a72fcca58-6ed627829e6so823923b3a.1
 for <69941 <at> debbugs.gnu.org>; Thu, 18 Apr 2024 03:18:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713435513; x=1714040313; darn=debbugs.gnu.org;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:cc:to:subject:user-agent:mime-version:date:message-id
 :from:to:cc:subject:date:message-id:reply-to;
 bh=di0O0Y/jxf1MxlJfQpo5y/d3Uwp9OyL0E9hr5ywyOAQ=;
 b=PnR/PGoes0jkYaxCY2FFZKismneeAdFOuLhtcZJ4Zg4o7embkvYNV9VnJ/aeVStV8s
 NBHUkXhiEs7qgE6xO7lr3KnpJjcQVXkA60Sg8hXYJABifL8KYSoHnjfFNAcbQZ4XivsP
 8FMzFBhIzithz4vFxmxscJUU5xyoxlGonf4Y58B1nate3os5jXY++vqIzuZSOIrOIy4i
 m2JH5Bge2sdbA8ahZ0n+RYX9HPkNEgjsDaQtCJVs5u7G2k5QTegmD4QAaHSfGYcauBj5
 E/EiMhCpgjOKOfwboDKiAVvXfAxA6SZMtX/ys6pfonKFgKb3MATc2m2b5/g2YG777Z5/
 7fHA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713435513; x=1714040313;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:cc:to:subject:user-agent:mime-version:date:message-id
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=di0O0Y/jxf1MxlJfQpo5y/d3Uwp9OyL0E9hr5ywyOAQ=;
 b=qBOo0ewD8ZwUnW0fjYcsh9QWBlH2X2dinjOEQ8vWQ73e/FZYLw0b3QvmU5Q1Qn7wrc
 Nj8g8UQtQIUrMyh4rdUa9WjBfBEX0nRwZUrfaMisfRzPp7EJ7JK+VMvpVwiwqmDoLauv
 hvxA/AgMM7PSeKVpvV6UxGFYJLITmcedFOWmzv3KAax4BTAsmtXi7VMDVA3hbpqZiZ4L
 FotbAay/QDBJSV2M9omb2p6h8puq54LwC/buKZmDwt+3oI9nU+fysBhd3zVmxS1/j9Ce
 o3UgEZYeMML5uB51sCEcVVo0lskKSrLj+LnVHdn6yRx5xVgi1vehie4E8pq+6kCt6LDv
 KWzQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCVSIF0Sy3x99KFQJVU3lkAIIeEO92ou9m4V3q/FYiDIFM5/mKJ6YUi8uEWR/w8dpIdqND9W+MnKbobXMp911/ex67/cpbM=
X-Gm-Message-State: AOJu0YxUHmg8ndShAUvqtRGT3NiQLLZXvsrCn+vV+uvk5imWJOjH5kGW
 +VhuIuIShqefw8qBgtmF5gQMn3H5MBFhehhYF9bSYDUGMQsBtRAVQQ/8Vw==
X-Google-Smtp-Source: AGHT+IHoyw+Sd/eDQuXnSum+fheMYFXNTFRq3jDYqe43SJesRlT5hJnRSH7chhFHQ3XqzYUC4D/vyQ==
X-Received: by 2002:a05:6a21:8015:b0:1a9:a32c:f6d6 with SMTP id
 ou21-20020a056a21801500b001a9a32cf6d6mr2327151pzb.55.1713435512900; 
 Thu, 18 Apr 2024 03:18:32 -0700 (PDT)
Received: from [192.168.0.100] ([181.228.33.6])
 by smtp.gmail.com with ESMTPSA id
 u3-20020a631403000000b005bdbe9a597fsm1098165pgl.57.2024.04.18.03.18.31
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 18 Apr 2024 03:18:32 -0700 (PDT)
Message-ID: <941f6565-203b-47bf-82a9-2bb7b0788b6a@HIDDEN>
Date: Thu, 18 Apr 2024 07:18:29 -0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
To: Stephen Berman <stephen.berman@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <865xxe1dwd.fsf@HIDDEN>
 <51c20b56-4b82-4f5c-9559-cdbd0146df22@HIDDEN> <87wmprqxj3.fsf@HIDDEN>
 <8734s5w1mf.fsf@HIDDEN>
Content-Language: en-US
From: Mauro Aranda <maurooaranda@HIDDEN>
In-Reply-To: <8734s5w1mf.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 69941
Cc: Eli Zaretskii <eliz@HIDDEN>, 69941 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

 > On Sun, 24 Mar 2024 19:45:20 +0100 Stephen Berman 
<stephen.berman@HIDDEN> wrote:
 >
 >> On Sat, 23 Mar 2024 17:49:53 -0300 Mauro Aranda 
<maurooaranda@HIDDEN> wrote:
 >>
 >>> Stephen Berman <stephen.berman@HIDDEN> writes:
 >>>
 >>>> 5. Tab back to "Activate" and press RET, again restoring the initial
 >>>> state.  Now tab to radio button "Two" and press RET.
 >>>> => The fontification is the same as in step 4: radio button "Two" has
 >>>> the widget-inactive face but radio button "One" has the default 
(active)
 >>>> face, though it is again inactive.  Repeatedly pressing either of the
 >>>> radio buttons (after activating them), does not change the 
fontification
 >>>> of "One" again.
 >>>>
 >>>>
 >>>> The faulty fontification of radio button "One" also obtains if 
there is
 >>>> just one radio button instead of two, and if there are more than two
 >>>> radio buttons, it is only the first one that displays the odd
 >>>> fontification (admittedly, I've only test up to three radio buttons).
 >>>>
 >>>> I've tried to debug this and found that the problem seems to be due to
 >>>> the sexp (set-marker-insertion-type from t) near the end of
 >>>> widget-default-create, which advances the marker specified by the
 >>>> widget's :from property.  Changing t to nil fixes the faulty
 >>>> fontification of the first radio button.
 >>>>
 >>>> I investigated the history of this code, and while the value t for the
 >>>> marker insertion type was used in the initial commit, it was 
changed to
 >>>> nil in commit e0f956935, with the message "Insert new text at the 
:from
 >>>> marker _after_ the marker, not before it."  But 18 days later it was
 >>>> changed back to t in commit 3bff434b8, that also added "Document 
need to
 >>>> put some text before the %v escape in :format string" of 
editable-field
 >>>> widgets.  (I looked at the bug-gnu-emacs and emacs-devel mailing list
 >>>> archives but found nothing relevant at the time just prior to these
 >>>> commits.)
 >>>
 >>> I'm pretty sure it makes sense for user-editable widgets that the
 >>> value for insertion-type be t.
 >>
 >> Yes, if my understanding is correct, it's just radio-button-choice
 >> widgets that need (the effect of) insertion type nil (at least for
 >> setting the widget-inactive face), see below.
 >>
 >>>> So evidently the advancing marker insertion type is needed for at 
least
 >>>> some widgets, though it seems to be problematic for radio 
buttons.  So I
 >>>> tried to conditionalize the choice of t or nil on the type of the
 >>>> widget.  I used (not (eq 'radio-button (widget-type widget))), 
since the
 >>>> argument `widget' of widget-default-create is, according to Edebug,
 >>>> indeed radio-button, so negating the eq sexp returns nil, which I had
 >>>> found to be the value of the marker insertion type that fixes the
 >>>> fontification (however, I couldn't think of a way of limiting the
 >>>> conditioning to only the first radio button, but in my testing so far
 >>>> that lack doesn't appear to make a difference).
 >>>
 >>> I'm not sure if the right target is the radio-button widget.  It could
 >>> be the radio-button-choice widget.  Did you try to conditionalize 
the code
 >>> against the radio-button-choice widget?
 >>
 >> I didn't, because I got hung up on the radio-button widget, since in
 >> Edebug that is what I saw and (mistakenly) took to be the current widget
 >> when widget-inactive face is set.  But the resulting marker insertion
 >> type discrepancy is really proof that I was looking at the wrong widget
 >> type (as I already realized in my comments cited below, but I didn't
 >> think to simply try it with radio-button-choice until now, so thanks for
 >> pointing me in the right direction!).  And indeed, with
 >> radio-button-choice, negating the eq test DTRT, i.e., using (not (eq
 >> 'radio-button-choice (widget-type widget))) as the condtion results in
 >> the correct fontification.  Since this sexp gives the
 >> radio-button-choice widget's :from property the marker insertion type
 >> nil, there is no discrepancy between using that sexp and directly using
 >> nil, so changing my patch to use that condition would be in improvement.
 >> Alternatively, ...
 >>
 >>>> But in fact, using the negation of the value of the eq sexp results in
 >>>> the same faulty fontification, while omitting the negation (as in the
 >>>> attached patch), which yields the advancing insertion type t, 
gives the
 >>>> correct fontification, just like using nil does. This makes no 
sense to
 >>>> me, yet it is reliably reproducible.  The only possible 
explanation that
 >>>> occurs to me is that the bug is triggered elsewhere in the Emacs code
 >>>> and somehow using the sexp that evaluates to t as the marker insertion
 >>>> type affects that code, while using t itself does not (or rather, has
 >>>> the opposite effect); but how that could be and where the culpable 
code
 >>>> is, I don't know (as a guess, perhaps in the C code that adds 
faces, but
 >>>> I don't know how to debug that).  If anyone knows or has an idea 
what's
 >>>> going on here, please communicate it.  In the meantime I will continue
 >>>> to use the widget library with the patch to see whether it has 
unwanted
 >>>> consequences.
 >>>
 >>> I don't know much about that code in Emacs.  If we find some hack that
 >>> works maybe we can use that until someone figures it out.  But again,
 >>> given your analysis, I'd like to find out if using the condition on the
 >>> radio-button-choice widget works as expected.  And of course, the hack
 >>> shouldn't be added to the widget-default-create, which should remain
 >>> type agnostic.
 >>
 >> ... since the issue is fontification with the widget-inactive face,
 >> perhaps a better location for the condition is widget-specify-inactive,
 >> as in the attached patch.  It's still a hack though, since
 >> widget-specify-inactive is also type-agnostic by design. But if the
 >> issue really is confined to radio-button-choice widget's, I guess any
 >> solution will have to refer to that type.  However, between adding the
 >> condition to widget-specify-inactive or to widget-default-create, I'm
 >> not sure which is less hacky: since the patch to widget-default-create
 >> effectively undoes the result of setting the marker insertion type to t,
 >> perhaps it is cleaner just to set it to nil for radio-button-choice
 >> widgets in widget-default-create.  Or maybe someone will come up with a
 >> better fix...
 >>
 >> Steve Berman
 >>
 >> diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
 >> index 172da3db1e0..01319853edc 100644
 >> --- a/lisp/wid-edit.el
 >> +++ b/lisp/wid-edit.el
 >> @@ -532,6 +532,17 @@ widget-inactive
 >>
 >>  (defun widget-specify-inactive (widget from to)
 >>    "Make WIDGET inactive for user modifications."
 >> +  ;; When WIDGET is a radio-button-choice widget and its first child
 >> +  ;; radio-button widget is inserted, the marker FROM, which has
 >> +  ;; insertion type t, advances to the position after the radio button,
 >> +  ;; and since the overlay setting the widget-inactive face begins at
 >> +  ;; the position of FROM, this results in the first radio button
 >> +  ;; incorrectly not being fontified with the widget-inactive face.  To
 >> +  ;; ensure it is correctly fontified, we move FROM backward by 3,
 >> +  ;; i.e. the length of the radio-button widget (from its string
 >> +  ;; representation "( )" or "(x)") (bug#69941).
 >> +  (when (eq (widget-type widget) 'radio-button-choice)
 >> +    (set-marker from (- from 3)))
 >>    (unless (widget-get widget :inactive)
 >>      (let ((overlay (make-overlay from to nil t nil)))
 >>        (overlay-put overlay 'face 'widget-inactive)
 >
 > To fix this bug, do you have a preference between this patch for
 > widget-specify-inactive and the attached patch for
 > widget-default-create?  Or do you have a better fix?
 >
 > Steve Berman

I don't really have a better fix.  I mean, ideally, we'd find the reason
why the setting behaves differently for the radio-button-choice widget,
and only for the first one in a radio widget, as it seems to me. But
I'll need more time to be able to look into that.

That said, if Eli is OK with installing a minor hack (with a FIXME,
please), I don't have problems.  And since it's a hack (and hopefully
temporary), it's better if we keep it at widget-default-create then.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 6 Apr 2024 10:18:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 06 06:18:48 2024
Received: from localhost ([127.0.0.1]:38357 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rt38J-0002Sy-OR
	for submit <at> debbugs.gnu.org; Sat, 06 Apr 2024 06:18:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53318)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rt38I-0002S5-0M
 for 69941 <at> debbugs.gnu.org; Sat, 06 Apr 2024 06:18:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rt386-0007Dq-E6; Sat, 06 Apr 2024 06:18:34 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=zmczGXcrhjuDj6JX8sr4zmTlpHuAHUt6GDGUom0SQsk=; b=J+VINpXNPH3ryUnuZTA7
 44gbJXm9yXLNYD/gqdg+QveXys8USendaLClsxjlJsXnM5z2uDZ01m3t1hMoKwWg/UcK5H8P0IN3N
 jzjcb+FOLQ75ovHjiyhxiVKFrFxY66w7p+JpSu04X0PZm3Lyhx/1XuJyvXUm/FOnHyEzgxlx7BErg
 yn44Thtqhvoi9H3WiB31cVpeaZuVuVi63dKCUAS+njMuJGwgozg3txuW4FPmaqakGTxdXDIQ7i+Au
 Ff03qt/Kd0z770p1Pjj9ubmc2LcRBR8eRhz/vK107f+WyiU58Y4gTQ8Tm2C1C8hN/HIM+Cn8RweIe
 zNbFLfhE/LJXYg==;
Date: Sat, 06 Apr 2024 13:18:31 +0300
Message-Id: <86plv23ibs.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: maurooaranda@HIDDEN, Stephen Berman <stephen.berman@HIDDEN>
In-Reply-To: <8734s5w1mf.fsf@HIDDEN> (message from Stephen Berman on Mon, 01
 Apr 2024 17:20:40 +0200)
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
References: <87h6gynx49.fsf@HIDDEN> <865xxe1dwd.fsf@HIDDEN>
 <51c20b56-4b82-4f5c-9559-cdbd0146df22@HIDDEN>
 <87wmprqxj3.fsf@HIDDEN> <8734s5w1mf.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ping!

> From: Stephen Berman <stephen.berman@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  69941 <at> debbugs.gnu.org,  Stefan Monnier
>  <monnier@HIDDEN>
> Date: Mon, 01 Apr 2024 17:20:40 +0200
> 
> On Sun, 24 Mar 2024 19:45:20 +0100 Stephen Berman <stephen.berman@HIDDEN> wrote:
> 
> > On Sat, 23 Mar 2024 17:49:53 -0300 Mauro Aranda <maurooaranda@HIDDEN> wrote:
> >
> >> Stephen Berman <stephen.berman@HIDDEN> writes:
> >>
> >>> 5. Tab back to "Activate" and press RET, again restoring the initial
> >>> state.  Now tab to radio button "Two" and press RET.
> >>> => The fontification is the same as in step 4: radio button "Two" has
> >>> the widget-inactive face but radio button "One" has the default (active)
> >>> face, though it is again inactive.  Repeatedly pressing either of the
> >>> radio buttons (after activating them), does not change the fontification
> >>> of "One" again.
> >>>
> >>>
> >>> The faulty fontification of radio button "One" also obtains if there is
> >>> just one radio button instead of two, and if there are more than two
> >>> radio buttons, it is only the first one that displays the odd
> >>> fontification (admittedly, I've only test up to three radio buttons).
> >>>
> >>> I've tried to debug this and found that the problem seems to be due to
> >>> the sexp (set-marker-insertion-type from t) near the end of
> >>> widget-default-create, which advances the marker specified by the
> >>> widget's :from property.  Changing t to nil fixes the faulty
> >>> fontification of the first radio button.
> >>>
> >>> I investigated the history of this code, and while the value t for the
> >>> marker insertion type was used in the initial commit, it was changed to
> >>> nil in commit e0f956935, with the message "Insert new text at the :from
> >>> marker _after_ the marker, not before it."  But 18 days later it was
> >>> changed back to t in commit 3bff434b8, that also added "Document need to
> >>> put some text before the %v escape in :format string" of editable-field
> >>> widgets.  (I looked at the bug-gnu-emacs and emacs-devel mailing list
> >>> archives but found nothing relevant at the time just prior to these
> >>> commits.)
> >>
> >> I'm pretty sure it makes sense for user-editable widgets that the
> >> value for insertion-type be t.
> >
> > Yes, if my understanding is correct, it's just radio-button-choice
> > widgets that need (the effect of) insertion type nil (at least for
> > setting the widget-inactive face), see below.
> >
> >>> So evidently the advancing marker insertion type is needed for at least
> >>> some widgets, though it seems to be problematic for radio buttons.  So I
> >>> tried to conditionalize the choice of t or nil on the type of the
> >>> widget.  I used (not (eq 'radio-button (widget-type widget))), since the
> >>> argument `widget' of widget-default-create is, according to Edebug,
> >>> indeed radio-button, so negating the eq sexp returns nil, which I had
> >>> found to be the value of the marker insertion type that fixes the
> >>> fontification (however, I couldn't think of a way of limiting the
> >>> conditioning to only the first radio button, but in my testing so far
> >>> that lack doesn't appear to make a difference).
> >>
> >> I'm not sure if the right target is the radio-button widget.  It could
> >> be the radio-button-choice widget.  Did you try to conditionalize the code
> >> against the radio-button-choice widget?
> >
> > I didn't, because I got hung up on the radio-button widget, since in
> > Edebug that is what I saw and (mistakenly) took to be the current widget
> > when widget-inactive face is set.  But the resulting marker insertion
> > type discrepancy is really proof that I was looking at the wrong widget
> > type (as I already realized in my comments cited below, but I didn't
> > think to simply try it with radio-button-choice until now, so thanks for
> > pointing me in the right direction!).  And indeed, with
> > radio-button-choice, negating the eq test DTRT, i.e., using (not (eq
> > 'radio-button-choice (widget-type widget))) as the condtion results in
> > the correct fontification.  Since this sexp gives the
> > radio-button-choice widget's :from property the marker insertion type
> > nil, there is no discrepancy between using that sexp and directly using
> > nil, so changing my patch to use that condition would be in improvement.
> > Alternatively, ...
> >
> >>> But in fact, using the negation of the value of the eq sexp results in
> >>> the same faulty fontification, while omitting the negation (as in the
> >>> attached patch), which yields the advancing insertion type t, gives the
> >>> correct fontification, just like using nil does.  This makes no sense to
> >>> me, yet it is reliably reproducible.  The only possible explanation that
> >>> occurs to me is that the bug is triggered elsewhere in the Emacs code
> >>> and somehow using the sexp that evaluates to t as the marker insertion
> >>> type affects that code, while using t itself does not (or rather, has
> >>> the opposite effect); but how that could be and where the culpable code
> >>> is, I don't know (as a guess, perhaps in the C code that adds faces, but
> >>> I don't know how to debug that).  If anyone knows or has an idea what's
> >>> going on here, please communicate it.  In the meantime I will continue
> >>> to use the widget library with the patch to see whether it has unwanted
> >>> consequences.
> >>
> >> I don't know much about that code in Emacs.  If we find some hack that
> >> works maybe we can use that until someone figures it out.  But again,
> >> given your analysis, I'd like to find out if using the condition on the
> >> radio-button-choice widget works as expected.  And of course, the hack
> >> shouldn't be added to the widget-default-create, which should remain
> >> type agnostic.
> >
> > ... since the issue is fontification with the widget-inactive face,
> > perhaps a better location for the condition is widget-specify-inactive,
> > as in the attached patch.  It's still a hack though, since
> > widget-specify-inactive is also type-agnostic by design.  But if the
> > issue really is confined to radio-button-choice widget's, I guess any
> > solution will have to refer to that type.  However, between adding the
> > condition to widget-specify-inactive or to widget-default-create, I'm
> > not sure which is less hacky: since the patch to widget-default-create
> > effectively undoes the result of setting the marker insertion type to t,
> > perhaps it is cleaner just to set it to nil for radio-button-choice
> > widgets in widget-default-create.  Or maybe someone will come up with a
> > better fix...
> >
> > Steve Berman
> >
> > diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
> > index 172da3db1e0..01319853edc 100644
> > --- a/lisp/wid-edit.el
> > +++ b/lisp/wid-edit.el
> > @@ -532,6 +532,17 @@ widget-inactive
> >  
> >  (defun widget-specify-inactive (widget from to)
> >    "Make WIDGET inactive for user modifications."
> > +  ;; When WIDGET is a radio-button-choice widget and its first child
> > +  ;; radio-button widget is inserted, the marker FROM, which has
> > +  ;; insertion type t, advances to the position after the radio button,
> > +  ;; and since the overlay setting the widget-inactive face begins at
> > +  ;; the position of FROM, this results in the first radio button
> > +  ;; incorrectly not being fontified with the widget-inactive face.  To
> > +  ;; ensure it is correctly fontified, we move FROM backward by 3,
> > +  ;; i.e. the length of the radio-button widget (from its string
> > +  ;; representation "( )" or "(x)") (bug#69941).
> > +  (when (eq (widget-type widget) 'radio-button-choice)
> > +    (set-marker from (- from 3)))
> >    (unless (widget-get widget :inactive)
> >      (let ((overlay (make-overlay from to nil t nil)))
> >        (overlay-put overlay 'face 'widget-inactive)
> 
> To fix this bug, do you have a preference between this patch for
> widget-specify-inactive and the attached patch for
> widget-default-create?  Or do you have a better fix?
> 
> Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 1 Apr 2024 15:20:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 01 11:20:58 2024
Received: from localhost ([127.0.0.1]:51374 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rrJSz-0003fc-7t
	for submit <at> debbugs.gnu.org; Mon, 01 Apr 2024 11:20:57 -0400
Received: from mout.gmx.net ([212.227.15.19]:51073)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1rrJSx-0003fP-M8
 for 69941 <at> debbugs.gnu.org; Mon, 01 Apr 2024 11:20:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1711984842; x=1712589642; i=stephen.berman@HIDDEN;
 bh=ff80F5P1vKxQG38joAlolyhVVnhfX3PY0zV595rYNwE=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:
 Date;
 b=raQo+S2tQAJcm1WzTip3r1qVY79R0BtFcGLqRC/0mM2GoIruRhgmvfMjZNrQOZM7
 K1jpaYe8Cnroq91DzG3x1rnYUIvMx8qgHE8Srdm11JRWwk2/xNJbwi2BuBashxQny
 2gbrcuztCoK4jMd36Y90OyUuRYfWPW1MoF7Ef6M4XbKOUzYr3qNim3Oruz0BNc5qq
 8wJm5G2tC0jNNrUgkqsk8RWg+xzlzV5aFtsUDSfcyDFZcs740AGB5onxSj3iUIWAA
 V5HbpPJgFT4Ozhhh/EvgMyrYxFfxckQa9jrq1sJPpwmEM+PB49l5cx+5KubcEVOYP
 9S2JbZlAjMOaNvsTVw==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfs ([94.134.95.171]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MNbp3-1sAlKD0bql-00P8Ad; Mon, 01
 Apr 2024 17:20:42 +0200
From: Stephen Berman <stephen.berman@HIDDEN>
To: Mauro Aranda <maurooaranda@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <87wmprqxj3.fsf@HIDDEN> (Stephen Berman's message of "Sun, 24
 Mar 2024 19:45:20 +0100")
References: <87h6gynx49.fsf@HIDDEN> <865xxe1dwd.fsf@HIDDEN>
 <51c20b56-4b82-4f5c-9559-cdbd0146df22@HIDDEN>
 <87wmprqxj3.fsf@HIDDEN>
Date: Mon, 01 Apr 2024 17:20:40 +0200
Message-ID: <8734s5w1mf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:+2qLvW7p7pyS2JmciX6bIMpUPvIkmwZFTfdCvWPE2uomr6jtnk9
 XqgiyDbbRTH7bHZ7Icy1fAWKOweNGKx1Zyee5cqIRAUlRyyzd9mk6CzJw0b2K3caweE2VUh
 FzCQtxYPMz7A0ov3kgr0E9s+OIvzevpooZ7lxNLX7A5eip9BuYUvled5bM1IEnUToiamBjm
 MBfidk/RdVvhSz2AySG8A==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:Vnr9gZ1dvVc=;aHEYg5SoFGlRJ0f4M5BDqHfULyf
 66YtKzSSUpF9rfeKvlpBMTz+0PXx4Yv1+jaEBY0JNrrxQ/h69MB3zzVfA+aSGuz0GVtvbmXv3
 66EpFd+MgmXEd7sNDBOS1YNceCV++YI4ztSaGiU9ejetqdc6wmQ5fhQkuUrI/BKd5umL/PqwB
 MacrtLa3xRoI/wbJu1KBRwuG0rdRPJ4kdqH8TcgnVN2RmQO55j2E/Ln5g34s1QpvfqZxxLdeG
 f7eDJDfULGwLMbLNwjpvV5+CcqWVmtUIviCsoogWg+CmJF/I0Ba0EteImB5XTWCXWpnGJj/nk
 aTLbTrI3hfO1OQG8lk0ZlPdMIBiYvIBnqUjVge1FIRd5kwx8umZ1SIpRRZ6y1e20GdABwun4Z
 p1fQt4kfMp0v41MxZcHKvexjyekQGJoyHWIAyMioDYhd4mfTZ/xpg0AI/q7n+A25dRS1HBqXd
 b41pGOoRHjvJz9ULCrSwccn90A9Lg5JqnJ1YpGXpoCfM9V0s9KPCSIArPbpx4DZXpAxwjI9NL
 3qSdAdPJwEH3HyXPyi5UJvDPCq4tfGRjqEMxD5GbdDFfKD+XTCLqfG2rsMcprHvTaHYQrfn0B
 7sfBEYng/Zk/MCVz++f7+AKKs/Eon9NnB/3UoXvNdWRFmiRjgUccTXqLCFrAumhPtM2e6fwbG
 4Rjv7fXOaWw3w9AOqzhZdAbdXuXXInLp0Fl6LbSuh+BW4jB+xXelXl6hk7TEzmhdfglOnF35M
 CzcKTeseoCP3ve6K6/kRI3SJfyLij5xKYco7Lz41BYeKIgwSYMKZlbKXaJEtiP7OU/DeL8v5+
 zc/n/yPeDC8mb2pMUWbzPk3KRIGztE1PamdRlj8UaTh6w=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 69941
Cc: Eli Zaretskii <eliz@HIDDEN>, 69941 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On Sun, 24 Mar 2024 19:45:20 +0100 Stephen Berman <stephen.berman@HIDDEN> =
wrote:

> On Sat, 23 Mar 2024 17:49:53 -0300 Mauro Aranda <maurooaranda@HIDDEN> =
wrote:
>
>> Stephen Berman <stephen.berman@HIDDEN> writes:
>>
>>> 5. Tab back to "Activate" and press RET, again restoring the initial
>>> state.=C2=A0 Now tab to radio button "Two" and press RET.
>>> =3D> The fontification is the same as in step 4: radio button "Two" has
>>> the widget-inactive face but radio button "One" has the default (active)
>>> face, though it is again inactive.=C2=A0 Repeatedly pressing either of =
the
>>> radio buttons (after activating them), does not change the fontification
>>> of "One" again.
>>>
>>>
>>> The faulty fontification of radio button "One" also obtains if there is
>>> just one radio button instead of two, and if there are more than two
>>> radio buttons, it is only the first one that displays the odd
>>> fontification (admittedly, I've only test up to three radio buttons).
>>>
>>> I've tried to debug this and found that the problem seems to be due to
>>> the sexp (set-marker-insertion-type from t) near the end of
>>> widget-default-create, which advances the marker specified by the
>>> widget's :from property.=C2=A0 Changing t to nil fixes the faulty
>>> fontification of the first radio button.
>>>
>>> I investigated the history of this code, and while the value t for the
>>> marker insertion type was used in the initial commit, it was changed to
>>> nil in commit e0f956935, with the message "Insert new text at the :from
>>> marker _after_ the marker, not before it."=C2=A0 But 18 days later it w=
as
>>> changed back to t in commit 3bff434b8, that also added "Document need to
>>> put some text before the %v escape in :format string" of editable-field
>>> widgets.=C2=A0 (I looked at the bug-gnu-emacs and emacs-devel mailing l=
ist
>>> archives but found nothing relevant at the time just prior to these
>>> commits.)
>>
>> I'm pretty sure it makes sense for user-editable widgets that the
>> value for insertion-type be t.
>
> Yes, if my understanding is correct, it's just radio-button-choice
> widgets that need (the effect of) insertion type nil (at least for
> setting the widget-inactive face), see below.
>
>>> So evidently the advancing marker insertion type is needed for at least
>>> some widgets, though it seems to be problematic for radio buttons.=C2=
=A0 So I
>>> tried to conditionalize the choice of t or nil on the type of the
>>> widget.=C2=A0 I used (not (eq 'radio-button (widget-type widget))), sin=
ce the
>>> argument `widget' of widget-default-create is, according to Edebug,
>>> indeed radio-button, so negating the eq sexp returns nil, which I had
>>> found to be the value of the marker insertion type that fixes the
>>> fontification (however, I couldn't think of a way of limiting the
>>> conditioning to only the first radio button, but in my testing so far
>>> that lack doesn't appear to make a difference).
>>
>> I'm not sure if the right target is the radio-button widget.=C2=A0 It co=
uld
>> be the radio-button-choice widget.=C2=A0 Did you try to conditionalize t=
he code
>> against the radio-button-choice widget?
>
> I didn't, because I got hung up on the radio-button widget, since in
> Edebug that is what I saw and (mistakenly) took to be the current widget
> when widget-inactive face is set.  But the resulting marker insertion
> type discrepancy is really proof that I was looking at the wrong widget
> type (as I already realized in my comments cited below, but I didn't
> think to simply try it with radio-button-choice until now, so thanks for
> pointing me in the right direction!).  And indeed, with
> radio-button-choice, negating the eq test DTRT, i.e., using (not (eq
> 'radio-button-choice (widget-type widget))) as the condtion results in
> the correct fontification.  Since this sexp gives the
> radio-button-choice widget's :from property the marker insertion type
> nil, there is no discrepancy between using that sexp and directly using
> nil, so changing my patch to use that condition would be in improvement.
> Alternatively, ...
>
>>> But in fact, using the negation of the value of the eq sexp results in
>>> the same faulty fontification, while omitting the negation (as in the
>>> attached patch), which yields the advancing insertion type t, gives the
>>> correct fontification, just like using nil does.=C2=A0 This makes no se=
nse to
>>> me, yet it is reliably reproducible.=C2=A0 The only possible explanatio=
n that
>>> occurs to me is that the bug is triggered elsewhere in the Emacs code
>>> and somehow using the sexp that evaluates to t as the marker insertion
>>> type affects that code, while using t itself does not (or rather, has
>>> the opposite effect); but how that could be and where the culpable code
>>> is, I don't know (as a guess, perhaps in the C code that adds faces, but
>>> I don't know how to debug that).=C2=A0 If anyone knows or has an idea w=
hat's
>>> going on here, please communicate it.=C2=A0 In the meantime I will cont=
inue
>>> to use the widget library with the patch to see whether it has unwanted
>>> consequences.
>>
>> I don't know much about that code in Emacs.=C2=A0 If we find some hack t=
hat
>> works maybe we can use that until someone figures it out.=C2=A0 But agai=
n,
>> given your analysis, I'd like to find out if using the condition on the
>> radio-button-choice widget works as expected.=C2=A0 And of course, the h=
ack
>> shouldn't be added to the widget-default-create, which should remain
>> type agnostic.
>
> ... since the issue is fontification with the widget-inactive face,
> perhaps a better location for the condition is widget-specify-inactive,
> as in the attached patch.  It's still a hack though, since
> widget-specify-inactive is also type-agnostic by design.  But if the
> issue really is confined to radio-button-choice widget's, I guess any
> solution will have to refer to that type.  However, between adding the
> condition to widget-specify-inactive or to widget-default-create, I'm
> not sure which is less hacky: since the patch to widget-default-create
> effectively undoes the result of setting the marker insertion type to t,
> perhaps it is cleaner just to set it to nil for radio-button-choice
> widgets in widget-default-create.  Or maybe someone will come up with a
> better fix...
>
> Steve Berman
>
> diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
> index 172da3db1e0..01319853edc 100644
> --- a/lisp/wid-edit.el
> +++ b/lisp/wid-edit.el
> @@ -532,6 +532,17 @@ widget-inactive
>=20=20
>  (defun widget-specify-inactive (widget from to)
>    "Make WIDGET inactive for user modifications."
> +  ;; When WIDGET is a radio-button-choice widget and its first child
> +  ;; radio-button widget is inserted, the marker FROM, which has
> +  ;; insertion type t, advances to the position after the radio button,
> +  ;; and since the overlay setting the widget-inactive face begins at
> +  ;; the position of FROM, this results in the first radio button
> +  ;; incorrectly not being fontified with the widget-inactive face.  To
> +  ;; ensure it is correctly fontified, we move FROM backward by 3,
> +  ;; i.e. the length of the radio-button widget (from its string
> +  ;; representation "( )" or "(x)") (bug#69941).
> +  (when (eq (widget-type widget) 'radio-button-choice)
> +    (set-marker from (- from 3)))
>    (unless (widget-get widget :inactive)
>      (let ((overlay (make-overlay from to nil t nil)))
>        (overlay-put overlay 'face 'widget-inactive)

To fix this bug, do you have a preference between this patch for
widget-specify-inactive and the attached patch for
widget-default-create?  Or do you have a better fix?

Steve Berman


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment
Content-Description: widget-default-create patch
Content-Transfer-Encoding: quoted-printable

diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 172da3db1e0..7fc9ac59b0a 100644
=2D-- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1733,8 +1733,17 @@ widget-default-create
        (goto-char value-pos)
        (widget-apply widget :value-create)))
    (let ((from (point-min-marker))
-	 (to (point-max-marker)))
-     (set-marker-insertion-type from t)
+	 (to (point-max-marker))
+         ;; When WIDGET is a radio-button-choice widget and its first
+         ;; child radio-button widget is inserted, advancing the marker
+         ;; FROM would make the overlay setting the widget-inactive face
+         ;; begin right after the first radio button, which would hence
+         ;; incorrectly not be fontified with the widget-inactive face.
+         ;; To ensure it is correctly fontified, we set the marker
+         ;; insertion type of FROM to nil only when WIDGET is
+         ;; radio-button-choice, otherwise to t (bug#69941).
+         (from-mit (not (eq 'radio-button-choice (widget-type widget)))))
+     (set-marker-insertion-type from from-mit)
      (set-marker-insertion-type to nil)
      (widget-put widget :from from)
      (widget-put widget :to to)))
diff --git a/test/lisp/wid-edit-tests.el b/test/lisp/wid-edit-tests.el
index 4b049478b29..d416eb99022 100644
=2D-- a/test/lisp/wid-edit-tests.el
+++ b/test/lisp/wid-edit-tests.el
@@ -336,7 +336,13 @@ widget-test-widget-move
     (widget-forward 2)
     (forward-char)
     (widget-backward 1)
-    (should (string=3D "Second" (widget-value (widget-at))))))
+    (should (string=3D "Second" (widget-value (widget-at))))
+    ;; Check that moving to a widget at beginning of buffer does not
+    ;; signal a beginning-of-buffer error (bug#69943).
+    (widget-backward 1)   ; Should not signal beginning-of-buffer error.
+    (widget-forward 2)
+    (should (string=3D "Third" (widget-value (widget-at))))
+    (widget-forward 1)))  ; Should not signal beginning-of-buffer error.

 (ert-deftest widget-test-color-match ()
   "Test that the :match function for the color widget works."

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 24 Mar 2024 18:46:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 24 14:46:20 2024
Received: from localhost ([127.0.0.1]:47412 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1roSrM-00080a-3R
	for submit <at> debbugs.gnu.org; Sun, 24 Mar 2024 14:46:20 -0400
Received: from mout.gmx.net ([212.227.15.18]:39777)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1roSrG-00080I-NB
 for 69941 <at> debbugs.gnu.org; Sun, 24 Mar 2024 14:46:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1711305922; x=1711910722; i=stephen.berman@HIDDEN;
 bh=Qaq0wPObH0uZYr4VirTrZYILcBDbFTp6AKH2U5xoKCg=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:
 Date;
 b=hnGl7QG2POXQkHsDENOSvqkXydXUYKezWOBZocsVSLNak1fUXnS9ZJohqkqSVePr
 6HQ7wT7bQTJi4856qVpiNLcbVLnXkEIn0MjzIBmZ5YQ8y5eeDw3TXKEU5hM56HMbI
 L2jb7g+UthSksnvWaSO4MWPkYFVri4FvmMaaaroNBHiiOZkLBEZUgzUIMI+bWUJrI
 6PeuIS3wwq2zuqKwbt/LaLXr1k1pC708EKoYrob2Yd5zBVmig6lSvqT8cjI1Rk3PF
 Q/fKYILn51oa7C03yoBlzMId6oiBTIr0iB6UYv4VqOIuUAw/wnVTsWzRQBM1mgzpJ
 Q+MYf3cuABQ2pogJ/g==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfs2 ([88.130.49.213]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mplc7-1seWjP06uL-00q8pH; Sun, 24
 Mar 2024 19:45:22 +0100
From: Stephen Berman <stephen.berman@HIDDEN>
To: Mauro Aranda <maurooaranda@HIDDEN>
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
In-Reply-To: <51c20b56-4b82-4f5c-9559-cdbd0146df22@HIDDEN> (Mauro Aranda's
 message of "Sat, 23 Mar 2024 17:49:53 -0300")
References: <87h6gynx49.fsf@HIDDEN> <865xxe1dwd.fsf@HIDDEN>
 <51c20b56-4b82-4f5c-9559-cdbd0146df22@HIDDEN>
Date: Sun, 24 Mar 2024 19:45:20 +0100
Message-ID: <87wmprqxj3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:u5xgSeIUyhcZtVjRCnDx7p4HhZSXJ5UpoPYb0SCidWdt5nYDDde
 fKtEpQOkX/4xmnvL8uiWk9KtKaJ5gcCbYe3oJL3UpGBmlYPy87YNJSTxzekComNJLa2QTwk
 Xz4Mlqdzdx3tk7tfKnJR3jCl0xIX+CGMJtR4TNooeAOS0Jddg5Zxp/QM/E2lTIPcwNtAUDo
 VbtkpQ48i1ksXUFQ3XwKA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:WFEwqBJtTrM=;JYRd7getSvCWTlnMmCKhHXtkGgT
 QwxmpvamKf7u0/71SbzdV6yUtepd7aBRlDutcJlV37VnasMA4SDkUoCeOgYoNOEt5fpp4518g
 ut2u0kZNzh4kks4Y+0YLQ9KlUS3xu+DDehzcJnZpu1cDf90nopq2i92RYnepF20lXWuDThitD
 h4dfeusiY33YOaP1ndhfrKBIb5CORzNQDOcIpSGfuMJioXM2rKBORKLTc04JvLGzKNCxt8RAd
 ncpIKhzuiuEgpZkdrQiOOoExiox3QVadxITzglalHSO/op+3h2LKb7EfRYGr+FLI/+Sn1hbfr
 TCqS3Elgd9t6jL2Fo0/2IwQ0/t5Y7GVk2jVJ4k8KCohB63NvWIhXKc33MLhtZmegdk0tqDF/b
 0CPMezQY4oBbZXhXkyVicLdcOjo5kW1wP4JJvvaF/oAUcLzFRP6eLYc1nD425uMQqGZmUXA3g
 +NcwkiZHUy+UxHEfKelVXzN/+FPfpObmubiwQtear9CDEGbX7ATdvSxAAVc3AkrxUcbkSpoHM
 WBuh2Yle+g6IeiIHr+Yluu+JxgPGMwv5IiJT+NUWp2v8+5Rpm7dSSigEziwLV6Qhh+TTQhISu
 w7hqE1FSz66pcVqxJygOWU2eqlbC6PvHPOTvxCJFuThDMjRWUTjtKbkDbv4xMpPCTW6RgRpRL
 0S2sMEgiNhvNqQ7SyoMXp73qYrIzOIiyiGVlap3qEHv0zEAgj0+mZHICvKM8GHDa0IQtSDCzp
 iTHYIU5gRZ/fdGlKevwFPjvJzukc88Xd664RUQ5Ynkg7jRomVUXJL4uXLU9bRkFvlR8FKyXaq
 Dsce9e1RpC0hxlaPx7ZZVvcOEDfXlgY6lrbE4N8z/WC58=
X-Spam-Score: 2.8 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  On Sat, 23 Mar 2024 17:49:53 -0300 Mauro Aranda wrote: > Stephen
    Berman writes: > >> 5. Tab back to "Activate" and press RET, again restoring
    the initial >> state.  Now tab to radio button "Two" and press RET. >> =>
    The fontification is the same as in [...] 
 
 Content analysis details:   (2.8 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [88.130.49.213 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (stephen.berman[at]gmx.net)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.15.18 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [212.227.15.18 listed in wl.mailspike.net]
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 69941
Cc: Eli Zaretskii <eliz@HIDDEN>, 69941 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.8 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  On Sat, 23 Mar 2024 17:49:53 -0300 Mauro Aranda wrote: > Stephen
    Berman writes: > >> 5. Tab back to "Activate" and press RET, again restoring
    the initial >> state.  Now tab to radio button "Two" and press RET. >> =>
    The fontification is the same as in [...] 
 
 Content analysis details:   (1.8 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [212.227.15.18 listed in wl.mailspike.net]
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [88.130.49.213 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.15.18 listed in list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (stephen.berman[at]gmx.net)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On Sat, 23 Mar 2024 17:49:53 -0300 Mauro Aranda <maurooaranda@HIDDEN> wr=
ote:

> Stephen Berman <stephen.berman@HIDDEN> writes:
>
>> 5. Tab back to "Activate" and press RET, again restoring the initial
>> state.=C2=A0 Now tab to radio button "Two" and press RET.
>> =3D> The fontification is the same as in step 4: radio button "Two" has
>> the widget-inactive face but radio button "One" has the default (active)
>> face, though it is again inactive.=C2=A0 Repeatedly pressing either of t=
he
>> radio buttons (after activating them), does not change the fontification
>> of "One" again.
>>
>>
>> The faulty fontification of radio button "One" also obtains if there is
>> just one radio button instead of two, and if there are more than two
>> radio buttons, it is only the first one that displays the odd
>> fontification (admittedly, I've only test up to three radio buttons).
>>
>> I've tried to debug this and found that the problem seems to be due to
>> the sexp (set-marker-insertion-type from t) near the end of
>> widget-default-create, which advances the marker specified by the
>> widget's :from property.=C2=A0 Changing t to nil fixes the faulty
>> fontification of the first radio button.
>>
>> I investigated the history of this code, and while the value t for the
>> marker insertion type was used in the initial commit, it was changed to
>> nil in commit e0f956935, with the message "Insert new text at the :from
>> marker _after_ the marker, not before it."=C2=A0 But 18 days later it was
>> changed back to t in commit 3bff434b8, that also added "Document need to
>> put some text before the %v escape in :format string" of editable-field
>> widgets.=C2=A0 (I looked at the bug-gnu-emacs and emacs-devel mailing li=
st
>> archives but found nothing relevant at the time just prior to these
>> commits.)
>
> I'm pretty sure it makes sense for user-editable widgets that the
> value for insertion-type be t.

Yes, if my understanding is correct, it's just radio-button-choice
widgets that need (the effect of) insertion type nil (at least for
setting the widget-inactive face), see below.

>> So evidently the advancing marker insertion type is needed for at least
>> some widgets, though it seems to be problematic for radio buttons.=C2=A0=
 So I
>> tried to conditionalize the choice of t or nil on the type of the
>> widget.=C2=A0 I used (not (eq 'radio-button (widget-type widget))), sinc=
e the
>> argument `widget' of widget-default-create is, according to Edebug,
>> indeed radio-button, so negating the eq sexp returns nil, which I had
>> found to be the value of the marker insertion type that fixes the
>> fontification (however, I couldn't think of a way of limiting the
>> conditioning to only the first radio button, but in my testing so far
>> that lack doesn't appear to make a difference).
>
> I'm not sure if the right target is the radio-button widget.=C2=A0 It cou=
ld
> be the radio-button-choice widget.=C2=A0 Did you try to conditionalize th=
e code
> against the radio-button-choice widget?

I didn't, because I got hung up on the radio-button widget, since in
Edebug that is what I saw and (mistakenly) took to be the current widget
when widget-inactive face is set.  But the resulting marker insertion
type discrepancy is really proof that I was looking at the wrong widget
type (as I already realized in my comments cited below, but I didn't
think to simply try it with radio-button-choice until now, so thanks for
pointing me in the right direction!).  And indeed, with
radio-button-choice, negating the eq test DTRT, i.e., using (not (eq
'radio-button-choice (widget-type widget))) as the condtion results in
the correct fontification.  Since this sexp gives the
radio-button-choice widget's :from property the marker insertion type
nil, there is no discrepancy between using that sexp and directly using
nil, so changing my patch to use that condition would be in improvement.
Alternatively, ...

>> But in fact, using the negation of the value of the eq sexp results in
>> the same faulty fontification, while omitting the negation (as in the
>> attached patch), which yields the advancing insertion type t, gives the
>> correct fontification, just like using nil does.=C2=A0 This makes no sen=
se to
>> me, yet it is reliably reproducible.=C2=A0 The only possible explanation=
 that
>> occurs to me is that the bug is triggered elsewhere in the Emacs code
>> and somehow using the sexp that evaluates to t as the marker insertion
>> type affects that code, while using t itself does not (or rather, has
>> the opposite effect); but how that could be and where the culpable code
>> is, I don't know (as a guess, perhaps in the C code that adds faces, but
>> I don't know how to debug that).=C2=A0 If anyone knows or has an idea wh=
at's
>> going on here, please communicate it.=C2=A0 In the meantime I will conti=
nue
>> to use the widget library with the patch to see whether it has unwanted
>> consequences.
>
> I don't know much about that code in Emacs.=C2=A0 If we find some hack th=
at
> works maybe we can use that until someone figures it out.=C2=A0 But again,
> given your analysis, I'd like to find out if using the condition on the
> radio-button-choice widget works as expected.=C2=A0 And of course, the ha=
ck
> shouldn't be added to the widget-default-create, which should remain
> type agnostic.

... since the issue is fontification with the widget-inactive face,
perhaps a better location for the condition is widget-specify-inactive,
as in the attached patch.  It's still a hack though, since
widget-specify-inactive is also type-agnostic by design.  But if the
issue really is confined to radio-button-choice widget's, I guess any
solution will have to refer to that type.  However, between adding the
condition to widget-specify-inactive or to widget-default-create, I'm
not sure which is less hacky: since the patch to widget-default-create
effectively undoes the result of setting the marker insertion type to t,
perhaps it is cleaner just to set it to nil for radio-button-choice
widgets in widget-default-create.  Or maybe someone will come up with a
better fix...

Steve Berman


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=widget-specify-inactive.diff
Content-Transfer-Encoding: quoted-printable

diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 172da3db1e0..01319853edc 100644
=2D-- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -532,6 +532,17 @@ widget-inactive

 (defun widget-specify-inactive (widget from to)
   "Make WIDGET inactive for user modifications."
+  ;; When WIDGET is a radio-button-choice widget and its first child
+  ;; radio-button widget is inserted, the marker FROM, which has
+  ;; insertion type t, advances to the position after the radio button,
+  ;; and since the overlay setting the widget-inactive face begins at
+  ;; the position of FROM, this results in the first radio button
+  ;; incorrectly not being fontified with the widget-inactive face.  To
+  ;; ensure it is correctly fontified, we move FROM backward by 3,
+  ;; i.e. the length of the radio-button widget (from its string
+  ;; representation "( )" or "(x)") (bug#69941).
+  (when (eq (widget-type widget) 'radio-button-choice)
+    (set-marker from (- from 3)))
   (unless (widget-get widget :inactive)
     (let ((overlay (make-overlay from to nil t nil)))
       (overlay-put overlay 'face 'widget-inactive)

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 23 Mar 2024 21:25:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 23 17:25:20 2024
Received: from localhost ([127.0.0.1]:54751 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ro8rf-0004iF-W5
	for submit <at> debbugs.gnu.org; Sat, 23 Mar 2024 17:25:20 -0400
Received: from mail-oi1-f171.google.com ([209.85.167.171]:44511)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maurooaranda@HIDDEN>) id 1ro8SA-0003dr-VN
 for 69941 <at> debbugs.gnu.org; Sat, 23 Mar 2024 16:58:59 -0400
Received: by mail-oi1-f171.google.com with SMTP id
 5614622812f47-3c3880cd471so1846286b6e.1
 for <69941 <at> debbugs.gnu.org>; Sat, 23 Mar 2024 13:58:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1711227432; x=1711832232; darn=debbugs.gnu.org;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:cc:to:subject:user-agent:mime-version:date:message-id
 :from:to:cc:subject:date:message-id:reply-to;
 bh=WBS1uRNuEGR3GDIMTiO4qKAMOkVUa/jV745k82v7gac=;
 b=h1rL+qOnTY6aeiFSkBPJF8DaMt+6W+t9TT4GgOLC3erf/XHfYf0tKlW0dsDrqHoA6P
 9JK94S8jWhXKrb8AzEs1ssmdFwJt/WcMKqyoKxKjf5rz+qzj9amO1SyTRu5px/6PuuzP
 p4uVxI9KxKH7YQ88lEm312sex4D5zZN5YtFvOG1LUBUedPfE8wSx1SiI93mGUj+AhyY0
 uXhVlok9TWdXRk/HiE6qX802zk95rfBCB/iQsCvSnp9z5XMoahKG7xS0fk8T3jwOD5dF
 cYou5Jslhiu6LKJ3ogHR1m0bP63eZccQVXlyYJ/LmIeCyu3Bub1ok0QPxHoCADk7/5pw
 ftgw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1711227432; x=1711832232;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:cc:to:subject:user-agent:mime-version:date:message-id
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=WBS1uRNuEGR3GDIMTiO4qKAMOkVUa/jV745k82v7gac=;
 b=LorOC6cMRbijhSxzK0lNfsliGjOiCRb0e1IUKd6g1Lb7MIPKG8EPTRqbkmdWU65nXY
 mw75yGD0DLXtgfpoyLKpkZFkULcBmM1MXxPrX4ds1dVmAh8DpCb2FW1FFlktIeyS6IxN
 q4IJXJEi5Kk/yn9+1IoPzJQ1VfKIj9J94MyMv2sKKxMII8IKEopYzlw6+SGdk9SnuQ1G
 yaUI0ZHOXnnUP1fjmYHy/eEI9zK3qwQ2/mxRuSvC4GcXJTWAo6zQwr0mHr0tgrAr1ObY
 wHBmJ2AyjlxxSCXMM/vrGenUvyrZaTGJ4sqNkStXaENAGqtgH/snrIBAR5khkTGNnOcs
 QTTw==
X-Gm-Message-State: AOJu0Yy0VvxntbnU25UNOH72s6kIn8zLMDncXC0EE4uo7VUOzi2blYZw
 ctKJsvu3DIBSAbWxfZ8WjAOBtbOVDw7dMdhXBDaDBqdEt/IZ6a0y5Q2+wB+7
X-Google-Smtp-Source: AGHT+IHjOFBKJbJ9DWY2Da5rf9u+Mv+kMW+MZyISwdIJ+RmRbiARMi19rdEK4OTDg+FKtYuvQ3EGeA==
X-Received: by 2002:a17:90b:1296:b0:2a0:38b5:bdc6 with SMTP id
 fw22-20020a17090b129600b002a038b5bdc6mr2384246pjb.22.1711226998611; 
 Sat, 23 Mar 2024 13:49:58 -0700 (PDT)
Received: from [192.168.0.234] ([181.228.33.6])
 by smtp.gmail.com with ESMTPSA id
 nn11-20020a17090b38cb00b0029b32b85d3dsm7481628pjb.29.2024.03.23.13.49.56
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 23 Mar 2024 13:49:58 -0700 (PDT)
Message-ID: <51c20b56-4b82-4f5c-9559-cdbd0146df22@HIDDEN>
Date: Sat, 23 Mar 2024 17:49:53 -0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
To: Eli Zaretskii <eliz@HIDDEN>, Stephen Berman <stephen.berman@HIDDEN>
References: <87h6gynx49.fsf@HIDDEN> <865xxe1dwd.fsf@HIDDEN>
Content-Language: en-US
From: Mauro Aranda <maurooaranda@HIDDEN>
In-Reply-To: <865xxe1dwd.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stephen Berman <stephen.berman@HIDDEN> writes:

 > 5. Tab back to "Activate" and press RET, again restoring the initial
 > state.  Now tab to radio button "Two" and press RET.
 > => The fontification is the same as in step 4: radio button "Two" has
 > the widget-inactive face but radio button "One" has the default (active)
 > face, though it is again inactive.  Repeatedly pressing either of the
 > radio buttons (after activating them), does not change the fontification
 > of "One" again.
 >
 >
 > The faulty fontification of radio button "One" also obtains if there is
 > just one radio button instead of two, and if there are more than two
 > radio buttons, it is only the first one that displays the odd
 > fontification (admittedly, I've only test up to three radio buttons).
 >
 > I've tried to debug this and found that the problem seems to be due to
 > the sexp (set-marker-insertion-type from t) near the end of
 > widget-default-create, which advances the marker specified by the
 > widget's :from property.  Changing t to nil fixes the faulty
 > fontification of the first radio button.
 >
 > I investigated the history of this code, and while the value t for the
 > marker insertion type was used in the initial commit, it was changed to
 > nil in commit e0f956935, with the message "Insert new text at the :from
 > marker _after_ the marker, not before it."  But 18 days later it was
 > changed back to t in commit 3bff434b8, that also added "Document need to
 > put some text before the %v escape in :format string" of editable-field
 > widgets.  (I looked at the bug-gnu-emacs and emacs-devel mailing list
 > archives but found nothing relevant at the time just prior to these
 > commits.)

I'm pretty sure it makes sense for user-editable widgets that the
value for insertion-type be t.

 > So evidently the advancing marker insertion type is needed for at least
 > some widgets, though it seems to be problematic for radio buttons.  So I
 > tried to conditionalize the choice of t or nil on the type of the
 > widget.  I used (not (eq 'radio-button (widget-type widget))), since the
 > argument `widget' of widget-default-create is, according to Edebug,
 > indeed radio-button, so negating the eq sexp returns nil, which I had
 > found to be the value of the marker insertion type that fixes the
 > fontification (however, I couldn't think of a way of limiting the
 > conditioning to only the first radio button, but in my testing so far
 > that lack doesn't appear to make a difference).

I'm not sure if the right target is the radio-button widget.  It could
be the radio-button-choice widget.  Did you try to conditionalize the code
against the radio-button-choice widget?

 > But in fact, using the negation of the value of the eq sexp results in
 > the same faulty fontification, while omitting the negation (as in the
 > attached patch), which yields the advancing insertion type t, gives the
 > correct fontification, just like using nil does.  This makes no sense to
 > me, yet it is reliably reproducible.  The only possible explanation that
 > occurs to me is that the bug is triggered elsewhere in the Emacs code
 > and somehow using the sexp that evaluates to t as the marker insertion
 > type affects that code, while using t itself does not (or rather, has
 > the opposite effect); but how that could be and where the culpable code
 > is, I don't know (as a guess, perhaps in the C code that adds faces, but
 > I don't know how to debug that).  If anyone knows or has an idea what's
 > going on here, please communicate it.  In the meantime I will continue
 > to use the widget library with the patch to see whether it has unwanted
 > consequences.

I don't know much about that code in Emacs.  If we find some hack that
works maybe we can use that until someone figures it out.  But again,
given your analysis, I'd like to find out if using the condition on the
radio-button-choice widget works as expected.  And of course, the hack
shouldn't be added to the widget-default-create, which should remain
type agnostic.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at 69941 <at> debbugs.gnu.org:


Received: (at 69941) by debbugs.gnu.org; 22 Mar 2024 15:33:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 22 11:33:23 2024
Received: from localhost ([127.0.0.1]:60775 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rngtW-0003A1-L7
	for submit <at> debbugs.gnu.org; Fri, 22 Mar 2024 11:33:23 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44454)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rngtS-00039c-R3
 for 69941 <at> debbugs.gnu.org; Fri, 22 Mar 2024 11:33:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rngsh-0006yQ-9S; Fri, 22 Mar 2024 11:32:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=CwWyTKOhkdVoX0dYgPG2sqLJgcJdmQkXpXkm2UGOw9U=; b=b7YSS73UIMSW
 YZ2XRzIPtf1bxpASUhlBRsQXOdZGNuzY+Ms/7KG9cySy1g4HBeN/hLv6Vn48dBbSIBixPBOUiNrMk
 bGKdsfoiuN59Em/f4R+Oy2XukWencDjaszZ5jvmFIl8xdxYuteb+AnBBSmAvNJYJUb7FNgr0FVL7i
 /vBpCWzVXbWooiDU7alBM+iJl9abeaQG5duBwlk+uXxbXumJEX/yhIjWA1t3ocaQc+zCGjJEInnTv
 WGq6X4R8qnekTfSnjfKsnx2VoI6wsTmu3nnF0Ag3q8vz6RfnXtoyaQO+NQ8EUlR2HuI5LBO7jR8ZJ
 4fONXp+6WEDxt+oJRjO4Xw==;
Date: Fri, 22 Mar 2024 17:31:46 +0200
Message-Id: <865xxe1dwd.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stephen Berman <stephen.berman@HIDDEN>,
 Mauro Aranda <maurooaranda@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <87h6gynx49.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#69941: 30.0.50; Faulty fontification of radio button widgets
References: <87h6gynx49.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69941
Cc: 69941 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Fri, 22 Mar 2024 15:45:42 +0100
> From:  Stephen Berman via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> 0. Save the following code (attached here to circumvent line breaks
> added by the mail program) as widget-example.el:
> 
> (custom-set-faces '(widget-inactive ((t (:foreground "magenta"
> 						     :background "yellow")))))
> 
> (defvar my-radio-widget)
> (defvar my-activate-button)
> 
> (defun my-widget-example ()
>   (interactive)
>   (switch-to-buffer "*My Widget Example*")
>   (kill-all-local-variables)
>   (let ((inhibit-read-only t))
>     (erase-buffer))
>   (remove-overlays)
>   (setq my-radio-widget
> 	(widget-create 'radio-button-choice
> 		       :notify (lambda (widget &rest _)
> 				 (widget-apply widget :deactivate)
> 				 (widget-apply my-activate-button :activate))
> 		       '(item "One") '(item "Two")))
>   (setq my-activate-button
> 	(widget-create 'push-button
> 		       :notify (lambda (widget &rest _)
> 				 (widget-value-set my-radio-widget "")
> 				 (widget-apply my-radio-widget :activate)
> 				 (widget-apply widget :deactivate))
> 		       "Activate"))
>   (widget-apply my-activate-button :deactivate)
>   (use-local-map widget-keymap)
>   (widget-setup))
> 
> 1. emacs -Q -l widget-example.el
> 2. M-x my-widget-example
> 
> In the buffer "*My Widget Example*" it easy to see (due to value of the
> widget-inactive face set in widget-example.el) that the push-button
> widget "Activate" is inactive and the radio-button widgets labelled
> "One" and "Two" are active (the buttons have the default face; that the
> labels next to the buttons have the widget-inactive face may seem odd,
> but that's not the bug I'm reporting here; I address that issue in a
> separate bug report).
> 
> 3. Press TAB (or S-TAB) twice to put point on the radio button "Two",
> then press RET.  As the fontification shows, now both radio buttons are
> inactive (so pressing RET on either raises the error "Attempt to perform
> action on inactive widget"), and the "Activate" button is now active.
> After tabbing to the "Activate" button and pressing RET, the initial
> state is restored, with the two radio buttons active and "Activate"
> inactive.
> 
> 4. Now tab up to the radio buttone "One" and press RET.
> => While radio button "Two" agains has the widget-inactive face, radio
> button "One" (just the button, not its label) has the default face used
> for active widgets, though it is in fact inactive (as pressing RET and
> getting the corresponding error verifies).
> 
> 5. Tab back to "Activate" and press RET, again restoring the initial
> state.  Now tab to radio button "Two" and press RET.
> => The fontification is the same as in step 4: radio button "Two" has
> the widget-inactive face but radio button "One" has the default (active)
> face, though it is again inactive.  Repeatedly pressing either of the
> radio buttons (after activating them), does not change the fontification
> of "One" again.
> 
> 
> The faulty fontification of radio button "One" also obtains if there is
> just one radio button instead of two, and if there are more than two
> radio buttons, it is only the first one that displays the odd
> fontification (admittedly, I've only test up to three radio buttons).
> 
> I've tried to debug this and found that the problem seems to be due to
> the sexp (set-marker-insertion-type from t) near the end of
> widget-default-create, which advances the marker specified by the
> widget's :from property.  Changing t to nil fixes the faulty
> fontification of the first radio button.
> 
> I investigated the history of this code, and while the value t for the
> marker insertion type was used in the initial commit, it was changed to
> nil in commit e0f956935, with the message "Insert new text at the :from
> marker _after_ the marker, not before it."  But 18 days later it was
> changed back to t in commit 3bff434b8, that also added "Document need to
> put some text before the %v escape in :format string" of editable-field
> widgets.  (I looked at the bug-gnu-emacs and emacs-devel mailing list
> archives but found nothing relevant at the time just prior to these
> commits.)
> 
> So evidently the advancing marker insertion type is needed for at least
> some widgets, though it seems to be problematic for radio buttons.  So I
> tried to conditionalize the choice of t or nil on the type of the
> widget.  I used (not (eq 'radio-button (widget-type widget))), since the
> argument `widget' of widget-default-create is, according to Edebug,
> indeed radio-button, so negating the eq sexp returns nil, which I had
> found to be the value of the marker insertion type that fixes the
> fontification (however, I couldn't think of a way of limiting the
> conditioning to only the first radio button, but in my testing so far
> that lack doesn't appear to make a difference).
> 
> But in fact, using the negation of the value of the eq sexp results in
> the same faulty fontification, while omitting the negation (as in the
> attached patch), which yields the advancing insertion type t, gives the
> correct fontification, just like using nil does.  This makes no sense to
> me, yet it is reliably reproducible.  The only possible explanation that
> occurs to me is that the bug is triggered elsewhere in the Emacs code
> and somehow using the sexp that evaluates to t as the marker insertion
> type affects that code, while using t itself does not (or rather, has
> the opposite effect); but how that could be and where the culpable code
> is, I don't know (as a guess, perhaps in the C code that adds faces, but
> I don't know how to debug that).  If anyone knows or has an idea what's
> going on here, please communicate it.  In the meantime I will continue
> to use the widget library with the patch to see whether it has unwanted
> consequences.
> 
> diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
> index 172da3db1e0..c2cd48e1551 100644
> --- a/lisp/wid-edit.el
> +++ b/lisp/wid-edit.el
> @@ -1733,8 +1733,9 @@ widget-default-create
>         (goto-char value-pos)
>         (widget-apply widget :value-create)))
>     (let ((from (point-min-marker))
> -	 (to (point-max-marker)))
> -     (set-marker-insertion-type from t)
> +	 (to (point-max-marker))
> +         (from-mit (eq 'radio-button (widget-type widget))))
> +     (set-marker-insertion-type from from-mit)
>       (set-marker-insertion-type to nil)
>       (widget-put widget :from from)
>       (widget-put widget :to to)))
> 

Mauro and Stefan, any comments or suggestions?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 Mar 2024 15:00:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 22 11:00:11 2024
Received: from localhost ([127.0.0.1]:58670 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rngNO-0001bG-RX
	for submit <at> debbugs.gnu.org; Fri, 22 Mar 2024 11:00:11 -0400
Received: from lists.gnu.org ([209.51.188.17]:60984)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1rngNK-0001Xf-E8
 for submit <at> debbugs.gnu.org; Fri, 22 Mar 2024 11:00:09 -0400
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 <stephen.berman@HIDDEN>)
 id 1rng9T-0004sX-3B
 for bug-gnu-emacs@HIDDEN; Fri, 22 Mar 2024 10:45:49 -0400
Received: from mout.gmx.net ([212.227.15.19])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <stephen.berman@HIDDEN>)
 id 1rng9R-0003jY-4T
 for bug-gnu-emacs@HIDDEN; Fri, 22 Mar 2024 10:45:46 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1711118743; x=1711723543; i=stephen.berman@HIDDEN;
 bh=9HnrS87+V75EG/mi/0+z2oI2w28pTBuld2yM4V3Qox8=;
 h=X-UI-Sender-Class:From:To:Subject:Date;
 b=Gft1R80KTQiBRe311sniDocD6FJpZZmqzmrRE6nBdsUiLqe6T1KHiVVOJ5s0iXML
 s/nxxR+qCX3Uq85anL0JHbHzyOQazmodky27Uj0bXus4MBy9YMMlM+m6eCiRKVdYI
 HCXI6k6t7BOwQDRpMCLzOx+dL4r9iqWZyTzXKbK/2rH0+SOzQkECbGhdOEt4UH3en
 6yxRj20vimXxfmRVnBwU7fLaUOlIMMNfBj1wVqKs7Dg+bDgNsdYMftnV4Y7Sw8f6O
 jv+W2dyxnV8lapJg6/S1Lmp8iN5xFhS924Li+XRUbAVpfRPDT8D/bWLSTsAj9mdXp
 +Ptj3GMRBr3RylWSPA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfs2 ([88.130.50.228]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N8ob6-1qj5VJ1ft8-015sjs for
 <bug-gnu-emacs@HIDDEN>; Fri, 22 Mar 2024 15:45:43 +0100
From: Stephen Berman <stephen.berman@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; Faulty fontification of radio button widgets
X-Debbugs-Cc: 
Date: Fri, 22 Mar 2024 15:45:42 +0100
Message-ID: <87h6gynx49.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:r3Wjr09sdLqkknsiYCL5cGFHCX/DGR3vBs470dPAA5Xys7FM1tx
 aBsERhAzhM8KTAtbPuUaotMhc1HLikZ4XOH2YNIm9mI3sIu9AIhnpEowLox4ybrqU4aw5hn
 imvdCmtcenBR6UQYbh9I3gHQ5iGdjyGz8DDc6LrrrLakOICcJtAootRxdmnC9usQuVLmgCS
 RnPB2AgGwskcNS+dg2sfw==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:zOlArsquE3M=;+A0VjoyWeOC5R7oyOJRwiQ7mVao
 a2YXFlf+dW+kAj2SsayzTkzooqCwg1bbDha5516sOc59XLaWLPkdEIs8d1CculuUYgY4a9U6H
 DRNWLtFJlW0tDTP8A13lD1pzNAeR13v8N4GwXP7HIdLLE8W/3d6RhxU/GFKJ8OrvQGS/ZTuFC
 yOT32ZWzvASgVYHkGz66nKn+Yt3ynA/Z2tM+nA1EPZDvqAs4MOrGDYC7VYDldYPwMVSCTd2qN
 82GPgipsVufxqlXtfNOXaPSTilIgk8lXV69KiRTo2MzHFW8S42PWXX+VYQs3rEUhLSzOSYMcL
 X1sLCTM7LktGuuhAqYRU1Zkg1ko4wSbRgd5p7ceSuHAK5kDrsLg1VjMv0T3nnh2hOF5YB4EKY
 qHYiw5PJgeyJloK9qQR1s6K3D2TAz6ogLiCO0VAhdhtKnK79YhiWRN2Twop1rQnG0LSscoNWf
 +N1UeALGdJTsIVbNv1VSQN/tGsn/2dtJgtU/4GLHH/zhqw+Ju7NAM7+QScoUgCIUW0fXjydYY
 SNkUPKtxlJjQYWeSvdF5UUP4qNmFs0Gn2QMzLLionwE1dOknp4RKP+NvxzZffx4eka+XMWckg
 ZAfcx55ABOxb+dLRFLTGSwleZ6GgVBpT0xl4iWgNLtSgaGiF7ji0uhLk5AsnU/zp02Mw25Nhb
 2kzPrAsdwbfHfr9XRD0izJrkQILynjP5YA5GH+UFNItLLb2egtZduj0MNbKekk1HK/r0TYwp6
 FnKBvR6QeF/ZNpB6sVC/sncx8E+P2FtWf7ZvXj+I30gHa9t7DqSNb1DcD9wHS3s+2Bx2iwGss
 /C+3mT/yOK3GrCLZfdpmz3HdXB4dM2RteXpSnq/SDaBro=
Received-SPF: pass client-ip=212.227.15.19;
 envelope-from=stephen.berman@HIDDEN; helo=mout.gmx.net
X-Spam_score_int: 5
X-Spam_score: 0.5
X-Spam_bar: /
X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 4.2 (++++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: 0. Save the following code (attached here to circumvent line
 breaks added by the mail program) as widget-example.el: 1. emacs -Q -l
 widget-example.el
 2. M-x my-widget-example In the buffer "*My Widget Example*" it easy to see
 (due to value of the widget-inactive face set in widget-example.el) that
 the push-button widget "Activate" is inactive and the radio-button widgets
 l [...] Content analysis details:   (4.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,
 medium trust [209.51.188.17 listed in list.dnswl.org]
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [88.130.50.228 listed in zen.spamhaus.org]
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (stephen.berman[at]gmx.net)
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 2.0 SPOOFED_FREEMAIL       No description available.
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  0. Save the following code (attached here to circumvent line
    breaks added by the mail program) as widget-example.el: 1. emacs -Q -l widget-example.el
    2. M-x my-widget-example In the buffer "*My Widget Example*" it easy to see
    (due to value of the widget-inactive face set in widget-example.el) that
   the push-button widget "Activate" is inactive and the radio-button widgets
    l [...] 
 
 Content analysis details:   (1.2 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [88.130.50.228 listed in zen.spamhaus.org]
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,
                             medium trust
                             [209.51.188.17 listed in list.dnswl.org]
  1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (stephen.berman[at]gmx.net)
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

--=-=-=
Content-Type: text/plain

0. Save the following code (attached here to circumvent line breaks
added by the mail program) as widget-example.el:


--=-=-=
Content-Type: application/emacs-lisp
Content-Disposition: attachment; filename=widget-example.el
Content-Transfer-Encoding: quoted-printable

(custom-set-faces '(widget-inactive ((t (:foreground "magenta"
						     :background "yellow")))))

(defvar my-radio-widget)
(defvar my-activate-button)

(defun my-widget-example ()
  (interactive)
  (switch-to-buffer "*My Widget Example*")
  (kill-all-local-variables)
  (let ((inhibit-read-only t))
    (erase-buffer))
  (remove-overlays)
  (setq my-radio-widget
	(widget-create 'radio-button-choice
		       :notify (lambda (widget &rest _)
				 (widget-apply widget :deactivate)
				 (widget-apply my-activate-button :activate))
		       '(item "One") '(item "Two")))
  (setq my-activate-button
	(widget-create 'push-button
		       :notify (lambda (widget &rest _)
				 (widget-value-set my-radio-widget "")
				 (widget-apply my-radio-widget :activate)
				 (widget-apply widget :deactivate))
		       "Activate"))
  (widget-apply my-activate-button :deactivate)
  (use-local-map widget-keymap)
  (widget-setup))

--=-=-=
Content-Type: text/plain


1. emacs -Q -l widget-example.el
2. M-x my-widget-example

In the buffer "*My Widget Example*" it easy to see (due to value of the
widget-inactive face set in widget-example.el) that the push-button
widget "Activate" is inactive and the radio-button widgets labelled
"One" and "Two" are active (the buttons have the default face; that the
labels next to the buttons have the widget-inactive face may seem odd,
but that's not the bug I'm reporting here; I address that issue in a
separate bug report).

3. Press TAB (or S-TAB) twice to put point on the radio button "Two",
then press RET.  As the fontification shows, now both radio buttons are
inactive (so pressing RET on either raises the error "Attempt to perform
action on inactive widget"), and the "Activate" button is now active.
After tabbing to the "Activate" button and pressing RET, the initial
state is restored, with the two radio buttons active and "Activate"
inactive.

4. Now tab up to the radio buttone "One" and press RET.
=> While radio button "Two" agains has the widget-inactive face, radio
button "One" (just the button, not its label) has the default face used
for active widgets, though it is in fact inactive (as pressing RET and
getting the corresponding error verifies).

5. Tab back to "Activate" and press RET, again restoring the initial
state.  Now tab to radio button "Two" and press RET.
=> The fontification is the same as in step 4: radio button "Two" has
the widget-inactive face but radio button "One" has the default (active)
face, though it is again inactive.  Repeatedly pressing either of the
radio buttons (after activating them), does not change the fontification
of "One" again.


The faulty fontification of radio button "One" also obtains if there is
just one radio button instead of two, and if there are more than two
radio buttons, it is only the first one that displays the odd
fontification (admittedly, I've only test up to three radio buttons).

I've tried to debug this and found that the problem seems to be due to
the sexp (set-marker-insertion-type from t) near the end of
widget-default-create, which advances the marker specified by the
widget's :from property.  Changing t to nil fixes the faulty
fontification of the first radio button.

I investigated the history of this code, and while the value t for the
marker insertion type was used in the initial commit, it was changed to
nil in commit e0f956935, with the message "Insert new text at the :from
marker _after_ the marker, not before it."  But 18 days later it was
changed back to t in commit 3bff434b8, that also added "Document need to
put some text before the %v escape in :format string" of editable-field
widgets.  (I looked at the bug-gnu-emacs and emacs-devel mailing list
archives but found nothing relevant at the time just prior to these
commits.)

So evidently the advancing marker insertion type is needed for at least
some widgets, though it seems to be problematic for radio buttons.  So I
tried to conditionalize the choice of t or nil on the type of the
widget.  I used (not (eq 'radio-button (widget-type widget))), since the
argument `widget' of widget-default-create is, according to Edebug,
indeed radio-button, so negating the eq sexp returns nil, which I had
found to be the value of the marker insertion type that fixes the
fontification (however, I couldn't think of a way of limiting the
conditioning to only the first radio button, but in my testing so far
that lack doesn't appear to make a difference).

But in fact, using the negation of the value of the eq sexp results in
the same faulty fontification, while omitting the negation (as in the
attached patch), which yields the advancing insertion type t, gives the
correct fontification, just like using nil does.  This makes no sense to
me, yet it is reliably reproducible.  The only possible explanation that
occurs to me is that the bug is triggered elsewhere in the Emacs code
and somehow using the sexp that evaluates to t as the marker insertion
type affects that code, while using t itself does not (or rather, has
the opposite effect); but how that could be and where the culpable code
is, I don't know (as a guess, perhaps in the C code that adds faces, but
I don't know how to debug that).  If anyone knows or has an idea what's
going on here, please communicate it.  In the meantime I will continue
to use the widget library with the patch to see whether it has unwanted
consequences.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=widget-default-create.diff

diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 172da3db1e0..c2cd48e1551 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1733,8 +1733,9 @@ widget-default-create
        (goto-char value-pos)
        (widget-apply widget :value-create)))
    (let ((from (point-min-marker))
-	 (to (point-max-marker)))
-     (set-marker-insertion-type from t)
+	 (to (point-max-marker))
+         (from-mit (eq 'radio-button (widget-type widget))))
+     (set-marker-insertion-type from from-mit)
      (set-marker-insertion-type to nil)
      (widget-put widget :from from)
      (widget-put widget :to to)))

--=-=-=
Content-Type: text/plain


In GNU Emacs 30.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.18.0) of 2024-03-22 built on strobelfs2
Repository revision: c1530a2e4973005633ebe00d447f1f3aa1200301
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101009
System Description: Linux From Scratch r12.0-112

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 NATIVE_COMP NOTIFY INOTIFY PDUMPER
PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM XWIDGETS GTK3 ZLIB

--=-=-=--




Acknowledgement sent to Stephen Berman <stephen.berman@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#69941; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 6 Feb 2025 15:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.