GNU bug report logs -
#18074
24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised
Previous Next
Reported by: Frank Terbeck <ft <at> bewatermyfriend.org>
Date: Mon, 21 Jul 2014 23:09:02 UTC
Severity: normal
Merged with 40336
Found in version 24.3.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18074 in the body.
You can then email your comments to 18074 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18074
; Package
emacs
.
(Mon, 21 Jul 2014 23:09:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Frank Terbeck <ft <at> bewatermyfriend.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 21 Jul 2014 23:09:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The manual says this:
‘default’
This element of SPEC doesn’t match any terminal; instead, it
specifies defaults that apply to all terminals. This element, if
used, must be the first element of SPEC. Each of the following
elements can override any or all of these defaults.
I tried using that in a theme, but the "override" part didn't work.
So I did this from "emacs -Q" to see if something else in my setup was
screwing things up for me:
(deftheme foobar "Foobar theme")
(custom-theme-set-faces 'foobar
'(default ((default :slant normal
:weight bold
:foreground "white"
:background "black")
(t :foreground "blue"))))
What I would expect is the `blue' foreground definition from the `t'
clause to override the `white' foreground definition from the `default'
clause. But alas, it doesn't work, the foreground remains white.
I asked gnu.emacs.help whether I was misinterpreting things, but the
person who felt compelled to reply agreed that this seems to be a bug.
So here's my report of the issue.
Regards, Frank
In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
of 2013-12-25 on jim, modified by Debian
(emacs-snapshot package, version 2:20131221-1)
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description: Debian GNU/Linux 7.6 (wheezy)
Configured using:
`configure --build x86_64-linux-gnu --host x86_64-linux-gnu
--prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
--localstatedir=/var --infodir=/usr/share/info/emacs-snapshot
--mandir=/usr/share/man --with-pop=yes
--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.3.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3.50/site-lisp:/usr/share/emacs/site-lisp
--with-crt-dir=/usr/lib/x86_64-linux-gnu/ --with-x=yes
--with-x-toolkit=gtk3 --with-imagemagick=yes 'CFLAGS=-DDEBIAN
-DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' CPPFLAGS=-D_FORTIFY_SOURCE=2
'LDFLAGS=-g -Wl,--as-needed -znocombreloc''
Important settings:
value of $LANG: en_GB.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
( d e f t h e e <backspace> m e SPC f o o b a r SPC
" F o o b a r SPC t h e m e " ) <return> <backspace>
C-j ( c u s t o m e <backspace> - t h e m e - s e t
- f a c e s <return> <tab> ' f o o b a r <return> <tab>
( <backspace> ' ( d e f a u l t SPC ( ( d e f a u l
t SPC : s l a n g <backspace> t SPC n o r m a l SPC
: w e i g h t SPC d e f a u l t C-w C-w <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> b o l d SPC : f o r e g r o u n d SPC "
w h i t e " SPC : b a c k g r o u n d " SPC <backspace>
<backspace> SPC " b l a c k " ) <return> ( t SPC :
f o r e g r o u n d SPC " b l u e " ) ) ) ) C-j M-x
r e p o r t <tab> <return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
kill-region: The mark is not set now, so there is no region [2 times]
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18074
; Package
emacs
.
(Tue, 22 Jul 2014 23:49:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 18074 <at> debbugs.gnu.org (full text, mbox):
I realise, that I reported the issue with a not entirely up-to-date
version of emacs. So tonight, I built an emacs from version control;
i.e. "M-x version" not yields:
GNU Emacs 24.3.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2) of
2014-07-23 on jim
This is actually based on:
commit b9535f929dc5534ba4a6868802947ebcf79ffd0c
...which is the HEAD of the `emacs-24' branch from the git repository at
savannah at the time this email is being written.
It appears that the bug is present in this version as well.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18074
; Package
emacs
.
(Wed, 26 Aug 2020 12:51:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 18074 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Frank Terbeck <ft <at> bewatermyfriend.org> writes:
> The manual says this:
>
> ‘default’
> This element of SPEC doesn’t match any terminal; instead, it
> specifies defaults that apply to all terminals. This element, if
> used, must be the first element of SPEC. Each of the following
> elements can override any or all of these defaults.
>
> I tried using that in a theme, but the "override" part didn't work.
>
> So I did this from "emacs -Q" to see if something else in my setup was
> screwing things up for me:
>
> (deftheme foobar "Foobar theme")
> (custom-theme-set-faces 'foobar
> '(default ((default :slant normal
> :weight bold
> :foreground "white"
> :background "black")
> (t :foreground "blue"))))
>
> What I would expect is the `blue' foreground definition from the `t'
> clause to override the `white' foreground definition from the `default'
> clause. But alas, it doesn't work, the foreground remains white.
I can reproduce this in Emacs 27, but not with current master.
It looks like this was fixed in:
commit 05d365d3105371ec956f31f109a2de14c5cf67df
Author: Eli Zaretskii <eliz <at> gnu.org>
Date: Sat Apr 4 09:59:16 2020 +0300
Fix face spec handling for 'default' "terminal class"
* lisp/faces.el (face-spec-choose): Reverse order of 'defaults'
and 'result' when generating attribute list, so that the spec for
'default' "terminal class" is indeed overridden by the actual
class's spec, per the documentation. (Bug#40336)
CCing Eli, hoping he can confirm.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18074
; Package
emacs
.
(Wed, 26 Aug 2020 13:08:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 18074 <at> debbugs.gnu.org (full text, mbox):
> From: Mauro Aranda <maurooaranda <at> gmail.com>
> Date: Wed, 26 Aug 2020 09:50:34 -0300
> Cc: 18074 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
>
> > (deftheme foobar "Foobar theme")
> > (custom-theme-set-faces 'foobar
> > '(default ((default :slant normal
> > :weight bold
> > :foreground "white"
> > :background "black")
> > (t :foreground "blue"))))
> >
> > What I would expect is the `blue' foreground definition from the `t'
> > clause to override the `white' foreground definition from the `default'
> > clause. But alas, it doesn't work, the foreground remains white.
>
> I can reproduce this in Emacs 27, but not with current master.
>
> It looks like this was fixed in:
> commit 05d365d3105371ec956f31f109a2de14c5cf67df
> Author: Eli Zaretskii <eliz <at> gnu.org>
> Date: Sat Apr 4 09:59:16 2020 +0300
>
> Fix face spec handling for 'default' "terminal class"
>
> * lisp/faces.el (face-spec-choose): Reverse order of 'defaults'
> and 'result' when generating attribute list, so that the spec for
> 'default' "terminal class" is indeed overridden by the actual
> class's spec, per the documentation. (Bug#40336)
>
> CCing Eli, hoping he can confirm.
Confirmed, thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18074
; Package
emacs
.
(Wed, 26 Aug 2020 13:52:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 18074 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
unarchive 40336
forcemerge 40336 18074
quit
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Mauro Aranda <maurooaranda <at> gmail.com>
>> Date: Wed, 26 Aug 2020 09:50:34 -0300
>> Cc: 18074 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
>>
>> > (deftheme foobar "Foobar theme")
>> > (custom-theme-set-faces 'foobar
>> > '(default ((default :slant normal
>> > :weight bold
>> > :foreground "white"
>> > :background "black")
>> > (t :foreground "blue"))))
>> >
>> > What I would expect is the `blue' foreground definition from the `t'
>> > clause to override the `white' foreground definition from the `default'
>> > clause. But alas, it doesn't work, the foreground remains white.
>>
>> I can reproduce this in Emacs 27, but not with current master.
>>
>> It looks like this was fixed in:
>> commit 05d365d3105371ec956f31f109a2de14c5cf67df
>> Author: Eli Zaretskii <eliz <at> gnu.org>
>> Date: Sat Apr 4 09:59:16 2020 +0300
>>
>> Fix face spec handling for 'default' "terminal class"
>>
>> * lisp/faces.el (face-spec-choose): Reverse order of 'defaults'
>> and 'result' when generating attribute list, so that the spec for
>> 'default' "terminal class" is indeed overridden by the actual
>> class's spec, per the documentation. (Bug#40336)
>>
>> CCing Eli, hoping he can confirm.
>
> Confirmed, thanks.
Thanks. Merging this bug with Bug#40336.
[Message part 2 (text/html, inline)]
Forcibly Merged 18074 40336.
Request was from
Mauro Aranda <maurooaranda <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 26 Aug 2020 13:52:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 24 Sep 2020 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 266 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.