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: Thu, 09 May 2024 10:22:35 +0300 Message-ID: <86zfsz78lg.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> 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="6013"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69942@debbugs.gnu.org, maurooaranda@gmail.com To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 09 09:23:48 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 1s4y82-0001Vm-Pu for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 May 2024 09:23:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4y7t-000130-QR; Thu, 09 May 2024 03:23:37 -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 1s4y7s-00012V-9F for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 03:23:36 -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 1s4y7s-0007TQ-10 for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 03:23:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4y8H-00078c-Rh for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 03:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 May 2024 07:24:01 +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.171523939927397 (code B ref 69942); Thu, 09 May 2024 07:24:01 +0000 Original-Received: (at 69942) by debbugs.gnu.org; 9 May 2024 07:23:19 +0000 Original-Received: from localhost ([127.0.0.1]:53603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4y7a-00077n-Cl for submit@debbugs.gnu.org; Thu, 09 May 2024 03:23:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4y7X-00077h-Kw for 69942@debbugs.gnu.org; Thu, 09 May 2024 03:23:16 -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 1s4y72-0007Gs-Dj; Thu, 09 May 2024 03:22: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=SutXpIVYSgaX7SEz3YqAlvuXOvFLHITlQ9COY8sJDJU=; b=IUFT0kWewbs6WUio5a32 9/4zSbe2PVZW3IY0j+G8zVUQ++1/N0OvVyT3U6dmLNiO4PkbiR6f4KnE2ntSrwaf6H4Rx4mMNKiZI YCWpb8Re6M8ip+9Pc4Ch0oEAJ3P8Ir2eunSKfqGrVpJiEf86nUbaenRa6O3v24MPf9W/0d8wscm6A yAR1Kr+qy7hJXxg3LhQI2qyXY0JjMJrFFbWzkkjHhPFspRZ6Ofl56IOMZCWAd3bRrNnjP/CTv4x3/ hYBiHGVleA9JsvkA0gPTEeI5xjfpfZqzN/AHV2uQmGWndVgBjoG3bmsZqg7YuW0/FHDwrURmqaO3D JjNnSFdWqLJ1Mw==; In-Reply-To: <87o79wl28x.fsf@gmx.net> (message from Stephen Berman on Fri, 26 Apr 2024 14:47:26 +0200) 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:284727 Archived-At: 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