From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69941: 30.0.50; Faulty fontification of radio button widgets Date: Sat, 11 May 2024 15:59:19 +0200 Message-ID: <87o79c8n60.fsf@gmx.net> References: <87h6gynx49.fsf@rub.de> Reply-To: Stephen Berman Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34858"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69941@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 11 16:00:34 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s5nH7-0008vh-4s for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 May 2024 16:00:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5nGj-0001Il-2J; Sat, 11 May 2024 10:00:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s5nGd-0001IG-88 for bug-gnu-emacs@gnu.org; Sat, 11 May 2024 10:00:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s5nGc-0001YG-VR for bug-gnu-emacs@gnu.org; Sat, 11 May 2024 10:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s5nGc-0007YG-17 for bug-gnu-emacs@gnu.org; Sat, 11 May 2024 10:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 May 2024 14:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69941 X-GNU-PR-Package: emacs Original-Received: via spool by 69941-submit@debbugs.gnu.org id=B69941.171543597328981 (code B ref 69941); Sat, 11 May 2024 14:00:01 +0000 Original-Received: (at 69941) by debbugs.gnu.org; 11 May 2024 13:59:33 +0000 Original-Received: from localhost ([127.0.0.1]:48508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5nG9-0007XN-2T for submit@debbugs.gnu.org; Sat, 11 May 2024 09:59:33 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:50271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5nG6-0007XH-Cd for 69941@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@gmx.net; 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 Original-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 In-Reply-To: (Stefan Monnier's message of "Thu, 09 May 2024 10:15:29 -0400") X-Provags-ID: V03:K1:8ie99ZWOvcUn5GPLZdcOYD/6o42APt1/03c43jjTe3KLyrhY7v8 FlrvJyjx4eQniC9o5aNMjB0PrYKwMcJZ6HTF3XE/sXKyWIZRoJRJI8USPASrPLEJovucN7K 3htt+Dy3etAScikaGlr32cA8TYkkDldvbpgkqhO0TrRN2ZBQXVszYelsTijlO24gbqhC8Wc ul5OoNVxOUhyGwfKyL6qA== 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+nBWqL X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284869 Archived-At: On Thu, 09 May 2024 10:15:29 -0400 Stefan Monnier 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