GNU bug report logs -
#77945
[PATCH] Add optional inherit argument to 'face-all-attributes'
Previous Next
To reply to this bug, email your comments to 77945 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77945
; Package
emacs
.
(Sun, 20 Apr 2025 17:16:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ship Mints <shipmints <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 20 Apr 2025 17:16:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The subject says it all. I find this quite convenient to examine a face
definition and its merged, effective definition.
It's not clear to me if this warrants news.
-Stephane
[Message part 2 (text/html, inline)]
[0001-Add-optional-inherit-argument-to-face-all-attributes.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77945
; Package
emacs
.
(Sun, 20 Apr 2025 19:09:07 GMT)
Full text and
rfc822 format available.
Message #8 received at 77945 <at> debbugs.gnu.org (full text, mbox):
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Sun, 20 Apr 2025 13:15:13 -0400
>
> The subject says it all. I find this quite convenient to examine a face definition and its merged, effective
> definition.
Please describe the situations where you need this, and what is
missing if the inherited attributes are not shown.
> It's not clear to me if this warrants news.
It does. Moreover, the function's documentation in the ELisp manual
needs to be updated.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77945
; Package
emacs
.
(Sun, 20 Apr 2025 21:47:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 77945 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, Apr 20, 2025 at 3:08 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Sun, 20 Apr 2025 13:15:13 -0400
> >
> > The subject says it all. I find this quite convenient to examine a face
> definition and its merged, effective
> > definition.
>
> Please describe the situations where you need this, and what is
> missing if the inherited attributes are not shown.
>
> > It's not clear to me if this warrants news.
>
> It does. Moreover, the function's documentation in the ELisp manual
> needs to be updated.
>
I've found this useful when trying to understand face definitions and when
inheritance is out of order vs. intended.
Updated patch attached.
-Stephane
[Message part 2 (text/html, inline)]
[0001-Add-optional-inherit-argument-to-face-all-attributes.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77945
; Package
emacs
.
(Mon, 21 Apr 2025 12:05:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 77945 <at> debbugs.gnu.org (full text, mbox):
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Sun, 20 Apr 2025 17:45:40 -0400
> Cc: 77945 <at> debbugs.gnu.org
>
> Please describe the situations where you need this, and what is
> missing if the inherited attributes are not shown.
>
> > It's not clear to me if this warrants news.
>
> It does. Moreover, the function's documentation in the ELisp manual
> needs to be updated.
>
> I've found this useful when trying to understand face definitions and when inheritance is out of order vs.
> intended.
Doesn't describe-face already satisfy that need?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77945
; Package
emacs
.
(Mon, 21 Apr 2025 12:12:04 GMT)
Full text and
rfc822 format available.
Message #17 received at 77945 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Apr 21, 2025 at 8:04 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Sun, 20 Apr 2025 17:45:40 -0400
> > Cc: 77945 <at> debbugs.gnu.org
> >
> > Please describe the situations where you need this, and what is
> > missing if the inherited attributes are not shown.
> >
> > > It's not clear to me if this warrants news.
> >
> > It does. Moreover, the function's documentation in the ELisp manual
> > needs to be updated.
> >
> > I've found this useful when trying to understand face definitions and
> when inheritance is out of order vs.
> > intended.
>
> Doesn't describe-face already satisfy that need?
>
I wanted a programmatic API where I could "diff" output.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77945
; Package
emacs
.
(Mon, 21 Apr 2025 12:54:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 77945 <at> debbugs.gnu.org (full text, mbox):
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Mon, 21 Apr 2025 08:11:00 -0400
> Cc: 77945 <at> debbugs.gnu.org
>
> On Mon, Apr 21, 2025 at 8:04 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Sun, 20 Apr 2025 17:45:40 -0400
> > Cc: 77945 <at> debbugs.gnu.org
> >
> > Please describe the situations where you need this, and what is
> > missing if the inherited attributes are not shown.
> >
> > > It's not clear to me if this warrants news.
> >
> > It does. Moreover, the function's documentation in the ELisp manual
> > needs to be updated.
> >
> > I've found this useful when trying to understand face definitions and when inheritance is out of order
> vs.
> > intended.
>
> Doesn't describe-face already satisfy that need?
>
> I wanted a programmatic API where I could "diff" output.
Sorry, I don't understand. describe-face produces a buffer that can
be diff'ed, right?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77945
; Package
emacs
.
(Mon, 21 Apr 2025 13:35:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 77945 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Apr 21, 2025 at 8:53 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Mon, 21 Apr 2025 08:11:00 -0400
> > Cc: 77945 <at> debbugs.gnu.org
> >
> > On Mon, Apr 21, 2025 at 8:04 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > > From: Ship Mints <shipmints <at> gmail.com>
> > > Date: Sun, 20 Apr 2025 17:45:40 -0400
> > > Cc: 77945 <at> debbugs.gnu.org
> > >
> > > Please describe the situations where you need this, and what is
> > > missing if the inherited attributes are not shown.
> > >
> > > > It's not clear to me if this warrants news.
> > >
> > > It does. Moreover, the function's documentation in the ELisp manual
> > > needs to be updated.
> > >
> > > I've found this useful when trying to understand face definitions and
> when inheritance is out of order
> > vs.
> > > intended.
> >
> > Doesn't describe-face already satisfy that need?
> >
> > I wanted a programmatic API where I could "diff" output.
>
> Sorry, I don't understand. describe-face produces a buffer that can
> be diff'ed, right?
>
I meant "diff" (hence my use of quotes) in the compare two lists
programmatically sense. The output of 'describe-face' also seems not to
have alternatives to enable/disable inheritance, not that it helps with
programmatic comparisons.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77945
; Package
emacs
.
(Mon, 21 Apr 2025 14:36:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 77945 <at> debbugs.gnu.org (full text, mbox):
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Mon, 21 Apr 2025 09:34:07 -0400
> Cc: 77945 <at> debbugs.gnu.org
>
> > Doesn't describe-face already satisfy that need?
> >
> > I wanted a programmatic API where I could "diff" output.
>
> Sorry, I don't understand. describe-face produces a buffer that can
> be diff'ed, right?
>
> I meant "diff" (hence my use of quotes) in the compare two lists programmatically sense.
I still don't understand. Lists are not the only data types that can
be diff'ed.
> The output of
> 'describe-face' also seems not to have alternatives to enable/disable inheritance, not that it helps with
> programmatic comparisons.
If the 'inherit' attribute is non-nil, describe-face shows a link to
the inherited face, and you can follow it.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77945
; Package
emacs
.
(Mon, 21 Apr 2025 14:46:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 77945 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Apr 21, 2025 at 10:34 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Mon, 21 Apr 2025 09:34:07 -0400
> > Cc: 77945 <at> debbugs.gnu.org
> >
> > > Doesn't describe-face already satisfy that need?
> > >
> > > I wanted a programmatic API where I could "diff" output.
> >
> > Sorry, I don't understand. describe-face produces a buffer that can
> > be diff'ed, right?
> >
> > I meant "diff" (hence my use of quotes) in the compare two lists
> programmatically sense.
>
> I still don't understand. Lists are not the only data types that can
> be diff'ed.
>
> > The output of
> > 'describe-face' also seems not to have alternatives to enable/disable
> inheritance, not that it helps with
> > programmatic comparisons.
>
> If the 'inherit' attribute is non-nil, describe-face shows a link to
> the inherited face, and you can follow it.
>
Yes, I understand. I prefer to examine these using *scratch* and/or
programs vs. using the interactive customize-style UI. face-attribute
already takes inherit, and it seems like a natural extension for
face-all-attributes to be in harmony, and with additional programmer
utility.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77945
; Package
emacs
.
(Mon, 21 Apr 2025 14:53:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 77945 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Apr 21, 2025 at 10:45 AM Ship Mints <shipmints <at> gmail.com> wrote:
> On Mon, Apr 21, 2025 at 10:34 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> > From: Ship Mints <shipmints <at> gmail.com>
>> > Date: Mon, 21 Apr 2025 09:34:07 -0400
>> > Cc: 77945 <at> debbugs.gnu.org
>> >
>> > > Doesn't describe-face already satisfy that need?
>> > >
>> > > I wanted a programmatic API where I could "diff" output.
>> >
>> > Sorry, I don't understand. describe-face produces a buffer that can
>> > be diff'ed, right?
>> >
>> > I meant "diff" (hence my use of quotes) in the compare two lists
>> programmatically sense.
>>
>> I still don't understand. Lists are not the only data types that can
>> be diff'ed.
>>
>> > The output of
>> > 'describe-face' also seems not to have alternatives to enable/disable
>> inheritance, not that it helps with
>> > programmatic comparisons.
>>
>> If the 'inherit' attribute is non-nil, describe-face shows a link to
>> the inherited face, and you can follow it.
>>
>
> Yes, I understand. I prefer to examine these using *scratch* and/or
> programs vs. using the interactive customize-style UI. face-attribute
> already takes inherit, and it seems like a natural extension for
> face-all-attributes to be in harmony, and with additional programmer
> utility.
>
I enjoy this:
(seq-difference
(face-all-attributes 'some-face (selected-frame))
(face-all-attributes 'some-face (selected-frame) 'inherit))
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77945
; Package
emacs
.
(Sat, 03 May 2025 08:32:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 77945 <at> debbugs.gnu.org (full text, mbox):
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Sun, 20 Apr 2025 17:45:40 -0400
> Cc: 77945 <at> debbugs.gnu.org
>
> * lisp/faces.el (face-all-attributes): Add inherit argument and
^^^^^^^
Please quote "inherit 'like this'.
> +@code{set-face-attribute}; see below. The optional argument
> +@var{inherit} has the same definition as in @code{face-attribute}, which
^^^^^^^^^^
"Meaning", not "definition". Also, "which see" is redundant here,
since face-attribute was described just above this function in the
manual.
> +see. This can aid understanding face definitions.
I'd either drop the last sentence, or say instead something like
This is useful when you want the face attributes to be absolute and
not @code{unspecified}.
> ++++
> +*** 'face-all-attributes' now accepts an optional inherit argument.
Please quote "inherit" here.
> +This will resolve all attributes.
This is inaccurate. I'd suggest to remove this sentence, since the
rest of the NEWS entry describes what it does more accurately.
> 'inherit' has the same meaning as
> +'face-attribute', which already takes this argument for a single
"same meaning as the same argument to 'face-attribute'"
Thanks.
This bug report was last modified 11 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.