From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69942: 30.0.50; Fontification of radio-button widget labels Date: Sat, 25 May 2024 10:41:40 +0300 Message-ID: <868qzy1gp7.fsf@gnu.org> References: <87frwinw9c.fsf@rub.de> <864jcy1dt3.fsf@gnu.org> <259fef2b-e0bf-46c4-8b42-5e26f906accb@gmail.com> <87v85bqxfv.fsf@gmx.net> <87msqnqh2z.fsf@gmx.net> <871q7pw1l4.fsf@gmx.net> <861q7i50f3.fsf@gnu.org> <3c8e0d62-4a92-413f-9064-a06514948860@gmail.com> <8634rjf2il.fsf@gnu.org> <5d36ff4c-fea8-4f64-b401-1351f91446a1@gmail.com> <877cguhjux.fsf@gmx.net> <87y196lctq.fsf@gmx.net> <87o79wl28x.fsf@gmx.net> <86zfsz78lg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31878"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69942@debbugs.gnu.org, stephen.berman@gmx.net To: maurooaranda@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 25 09:42:28 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 1sAm2t-000831-TQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 May 2024 09:42:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAm2P-0002mT-P5; Sat, 25 May 2024 03:41:57 -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 1sAm2N-0002lS-41 for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 03:41:55 -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 1sAm2M-0006G4-SS for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 03:41:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sAm2U-0006rT-5t for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 03:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 May 2024 07:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69942 X-GNU-PR-Package: emacs Original-Received: via spool by 69942-submit@debbugs.gnu.org id=B69942.171662292026369 (code B ref 69942); Sat, 25 May 2024 07:42:02 +0000 Original-Received: (at 69942) by debbugs.gnu.org; 25 May 2024 07:42:00 +0000 Original-Received: from localhost ([127.0.0.1]:41818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAm2S-0006rF-1H for submit@debbugs.gnu.org; Sat, 25 May 2024 03:42:00 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAm2P-0006r9-Fh for 69942@debbugs.gnu.org; Sat, 25 May 2024 03:41:58 -0400 Original-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 ) id 1sAm2C-0006EJ-Oj; Sat, 25 May 2024 03:41:44 -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=JASfD0xdAdOFtdHzJgdtZVcymTcrj2bJIPj60dHrtrk=; b=lonK37k9MfvqQnauK2Ux YJtTCRejctqMhPgvMOXQmNp2Kfdy82mz+tiNQ3euIQxpPksILJP+VAcdTMjNj+DceyArpxamW3R2Q c1JtafYK62/cb2lWY51i/xMT1Qoq4jNZqcebGwLRlF4g2au5JsTL3iuLWoA/Y59gP6BTtN3qiGzls 4RSdH9sRfuDh+sdtvrEZb5jjU8hngk8/WWRd7scO7qQ4w1WtMbJe4nmt0a56TseZIIC9kvQ2YmsHM Sl0Ez4kwCyIhv1MoSq5y6r+bbYrYd12SO/qmW13OJs7rNDC4JAfmjlyVMSEfV9k0ojL60vWh/imn+ c/rizQ3FQNvXig==; In-Reply-To: <86zfsz78lg.fsf@gnu.org> (message from Eli Zaretskii on Thu, 09 May 2024 10:22:35 +0300) 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:285826 Archived-At: Ping! Ping! Can we please make some progress here? > Cc: 69942@debbugs.gnu.org, maurooaranda@gmail.com > Date: Thu, 09 May 2024 10:22:35 +0300 > From: Eli Zaretskii > > Ping! Any further comments, or is there agreement to install the > proposed patch? > > > From: Stephen Berman > > Cc: Eli Zaretskii , 69942@debbugs.gnu.org > > Date: Fri, 26 Apr 2024 14:47:26 +0200 > > > > On Sun, 21 Apr 2024 21:45:21 +0200 Stephen Berman wrote: > > > > > On Thu, 18 Apr 2024 15:37:58 +0200 Stephen Berman wrote: > > > > > >> On Thu, 18 Apr 2024 07:07:43 -0300 Mauro Aranda wrote: > > >> > > >>> Eli Zaretskii writes: > > >>> > > >>>>> Date: Mon, 8 Apr 2024 07:58:44 -0300 > > >>>>> Cc: 69942@debbugs.gnu.org > > >>>>> From: Mauro Aranda > > >>>>> > > >>>>> On 6/4/24 06:02, Eli Zaretskii wrote: > > >>>>>  >> From: Stephen Berman > > >>>>>  >> Cc: Eli Zaretskii , 69942@debbugs.gnu.org > > >>>>>  >> Date: Mon, 01 Apr 2024 17:21:27 +0200 > > >>>>>  >> > > >>>>>  >> On Mon, 25 Mar 2024 01:40:36 +0100 Stephen Berman > > >>>>> wrote: > > >>>>>  >> > > >>>>>  >>> Ok, I've gotten further with implementing disinguishing by faces > > >>>>>  >>> selected (chosen) and unselected radio buttons in radio-button-choice > > >>>>>  >>> widgets and check boxes in checklist widgets, see the attached patch. > > >>>>>  >>> Initial tests seem ok, but it definitely needs more testing. > > >>>>>  >> > > >>>>>  >> Any comments on this patch for using a widget-unselected face?  I have > > >>>>>  >> been detained from further testing this past week, but can now resume. > > >>>>>  > > > >>>>>  > Mauro, any further comments? > > >>>>> > > >>>>> Hi Eli and Stephen, > > >>>>> > > >>>>> Please forgive me, for the past 2 weeks I haven't been able to do any > > >>>>> computer stuff.  If it's OK, please give me until the weekend so I > > >>>>> can catch up with this and the other 2 bug reports by Stephen. > > >>>> > > >>>> Mauro, were you able to find time to look into this and the other 2 > > >>>> bugs? > > >>> > > >>> I have, just now.  The patch looks good to me.  It'll be great if > > >>> Stephen can add some documentation to the manual, so it stays updated. > > >>> If not, I can do that in a few days. > > >> > > >> Sure, I'll add documentation and post it here for approval before > > >> pushing the changes. > > > > > > I've encountered some problems with the patch. One is that it breaks > > > the display of all face attributes in the customize-face buffer. I've > > > determined the part of the patch that triggers this, though I haven't > > > yet figured out just why this bit of code breaks the display. Also, it > > > appears that the widget-unselected face does not completely replace > > > widget-inactive where it's intended to do so, but I need to do more > > > testing and debugging here to find out why. Until I've fixed these > > > issues the patch is not suitable for installing, so I'm also holding off > > > with the accompanying documentation. (But in preparation for the > > > documentation I looked more closely at the Widget manual and found > > > several typos and other issues, for which I opened bug#70502.) > > > > The breakage in displaying all face attributes in the customize-face > > buffer was caused by the invocation of `(widget-specify-selected child)' > > in widget-checklist-add-item in the cond-clause satisfying > > `(widget-inline-p type t)'. I still don't understand why it has this > > effect, and I have to admit that I don't understand what an inline > > widget is. But simply omitting the invocation of > > `(widget-specify-selected child)' at this point in the patch does avoid > > the customize-face breakage and I have not noticed any problems due to > > this omission. > > > > As for the problematic interaction between the widget-unselected and > > widget-inactive faces, this seems to have been due to my having copied > > most of the definition of widget-specify-unselected from that of > > widget-specify-inactive, and specifically, copying the overlay priority. > > In the attached patch, widget-specify-unselected now uses a lower > > overlay priority than the one used in widget-specify-inactive, and in my > > tests this yields the desired results: the labels of active checkboxes > > and radio-buttons have widget-unselected face but when these widgets are > > deactivated, the labels have widget-inactive face. > > > > Another change I've made in the attached patch is to have the default > > value of widget-unselected face inherit from widget-inactive instead of > > inheriting from shadow face, like widget-inactive does by default. This > > way, if a user customizes widget-inactive, that will also apply by > > default to widget-unselected, thus retaining the current default widget > > UI where the labels of checkboxes and radio-buttons have widget-inactive > > face. (Thus, the "desired results" in the preceding paragraph are only > > visible when widget-unselected face is customized to differ from > > widget-unselected face.) > > > > Finally, regarding documentation of widget-unselected face in the Widget > > manual, I think it would be helpful for the documentation to mention the > > use case that motivated introducing it (following Mauro's suggestion to > > use a face instead of a defcustom), namely, to visually distinguish the > > labels of unselected and inactive widgets. Here is what I suggest: > > > > @deffn Face widget-unselected > > Face used for unselected widgets. This face is also used on the text > > labels of radio-button and checkbox widgets. > > > > The default value inherits @code{widget-inactive} face. If you want to > > visually distinguish the labels of unselected active radio-button or > > checkbox widgets from the labels of unselected inactive widgets, > > customize this face to a non-default value. > > @end deffn > > > > Since the recent widget.texi changes that include documenting > > widget-inactive face have not yet been merged to master, I haven't > > included the propopsed documentaton of widget-unselected in the attached > > patch, but if approved, will of course add it after the merge. > > > > Steve Berman > > > >