* [rob@tenfoot.org.uk: set-face-attribute doesn't set default for new frames]
@ 2007-03-24 14:08 Richard Stallman
2007-03-24 14:52 ` Chong Yidong
0 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2007-03-24 14:08 UTC (permalink / raw)
To: emacs-devel
Would someone please DTRT, then ack?
------- Start of forwarded message -------
X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY
autolearn=failed version=3.1.0
From: Rob Walker <rob@tenfoot.org.uk>
To: emacs-pretest-bug@gnu.org
Date: Tue, 20 Mar 2007 16:27:10 +0000
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Disposition: inline
Subject: set-face-attribute doesn't set default for new frames
Hi,
set-face-attribute doesn't set the default for new frames with todays CVS.
Instead, the value used in custom-set-faces is used instead even though I
specify nil for the frame (all current frames and future frames) in set-face-attribute.
I have custom vars set up for various faces and then some machine specific
overrides (using set-face-attribute) for when the normal face doesn't look
very good. I've managed to reduce the steps needed to reproduce the bug to
the following:
1. Make .emacs contain only the following:
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(variable-pitch ((t (:weight normal :height 1.0 :width normal :family "Bitstream Vera Sans"))))
)
; set the machine specific face
(set-face-attribute 'variable-pitch nil :family "DejaVu Sans")
2. Start emacs
3. Type M-x describe-face RET variable-pitch RET
The face family will be shown as "DejaVu Sans"
4. Create a new frame with M-x make-frame RET
5. Type M-x describe-face RET variable-pitch RET
The face family will be incorrectly shown as "Bitstream Vera Sans"
The variable-pitch face will have the incorrect "Bitstream Vera Sans"
family on all other frames.
This is different to the behaviour with my last build of emacs (2006-12-01)
which showed the correct behaviour of keeping "DejaVu Sans" on all frames.
Regards
Rob Walker
(Please ensure I am CC'd in any replies as I'm not subscribed to the emacs-pretest-bug list)
In GNU Emacs 22.0.96.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
of 2007-03-20 on arm04507-etch
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure '--prefix=/local_home/rwalker/local/emacs-20070320' '--with-gtk''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: C
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_GB.UTF-8
locale-coding-system: utf-8
default-enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
M-x d e s c r i b e - f a c e <return> v a r i a b
l e - p i t c h <return> M-x m a k e - f r a m e <return>
<switch-frame> M-x d e s c r i b e - f r a <backspace>
<backspace> a c e <return> v a r i a b l e - p i t
c h <return> M-x r e p o r t b u <tab> <backspace>
<backspace> <backspace> <tab> <return>
Recent messages:
(emacs)
For information about the GNU Project and its goals, type C-h C-p. [2 times]
Loading thingatpt...done
Loading help-mode...done
Loading help-fns...done
Type C-x 1 to remove help window. [2 times]
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done
_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [rob@tenfoot.org.uk: set-face-attribute doesn't set default for new frames]
2007-03-24 14:08 [rob@tenfoot.org.uk: set-face-attribute doesn't set default for new frames] Richard Stallman
@ 2007-03-24 14:52 ` Chong Yidong
2007-03-25 17:28 ` Richard Stallman
0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2007-03-24 14:52 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
> set-face-attribute doesn't set the default for new frames with
> todays CVS. Instead, the value used in custom-set-faces is used
> instead even though I specify nil for the frame (all current frames
> and future frames) in set-face-attribute.
>
> I have custom vars set up for various faces and then some machine specific
> overrides (using set-face-attribute) for when the normal face doesn't look
> very good. I've managed to reduce the steps needed to reproduce the bug to
> the following:
This is due to the code that is supposed to prevent user face
customizations from being overridden by X resources on new frames.
I argued, at the time, that that behavior (which has been around since
at least Emacs 21) is not trivial to change. After much argument, I
proposed a hack where face-set-after-frame-default recalculates the
theme-face after applying X resources. We now see that this hack
causes a different, more serious set of problems.
There seems to be no way to fix both bugs without an overhaul of the
faces code.
The original problem is, ultimately, external to Emacs: Gnome themes
specify a default X resource for the Emacs mode-line, which should be
left to the user. So I propose reverting my patch, which will fix the
current bug, and documenting the X resource problem in PROBLEMS.
We can then revisit the X resource problem after Emacs 22 is released.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [rob@tenfoot.org.uk: set-face-attribute doesn't set default for new frames]
2007-03-24 14:52 ` Chong Yidong
@ 2007-03-25 17:28 ` Richard Stallman
2007-03-25 19:01 ` Chong Yidong
0 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2007-03-25 17:28 UTC (permalink / raw)
To: Chong Yidong; +Cc: emacs-devel
The original problem is, ultimately, external to Emacs: Gnome themes
specify a default X resource for the Emacs mode-line, which should be
left to the user. So I propose reverting my patch, which will fix the
current bug, and documenting the X resource problem in PROBLEMS.
That is the immediate cause, but the bug is a bug anyway.
I think another attempt should be made to fix this.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [rob@tenfoot.org.uk: set-face-attribute doesn't set default for new frames]
2007-03-25 17:28 ` Richard Stallman
@ 2007-03-25 19:01 ` Chong Yidong
2007-03-26 20:27 ` Rob Walker
0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2007-03-25 19:01 UTC (permalink / raw)
To: rms; +Cc: Juri Linkov, Rob Walker, emacs-devel
Richard Stallman <rms@gnu.org> writes:
> > > set-face-attribute doesn't set the default for new frames with todays
> > > CVS. Instead, the value used in custom-set-faces is used instead even
> > > though I specify nil for the frame (all current frames and future
> > > frames) in set-face-attribute.
>
> > The original problem is, ultimately, external to Emacs: Gnome themes
> > specify a default X resource for the Emacs mode-line, which should be
> > left to the user. So I propose reverting my patch, which will fix the
> > current bug, and documenting the X resource problem in PROBLEMS.
>
> That is the immediate cause, but the bug is a bug anyway.
> I think another attempt should be made to fix this.
OK. I checked in another fix for the bug. I've tried every
combination of custom-set-face, set-face-attribute, and X resources I
could think of, and it seems to work fine. But please help me test
the fix!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [rob@tenfoot.org.uk: set-face-attribute doesn't set default for new frames]
2007-03-25 19:01 ` Chong Yidong
@ 2007-03-26 20:27 ` Rob Walker
0 siblings, 0 replies; 5+ messages in thread
From: Rob Walker @ 2007-03-26 20:27 UTC (permalink / raw)
To: Chong Yidong; +Cc: Juri Linkov, rms, emacs-devel
On Sunday 25 March 2007 20:01, Chong Yidong wrote:
> OK. I checked in another fix for the bug. I've tried every
> combination of custom-set-face, set-face-attribute, and X resources I
> could think of, and it seems to work fine. But please help me test
> the fix!
I've rebuilt emacs this morning and the faces are now working as expected.
Thanks for the quick response.
Regards
Rob
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-03-26 20:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-24 14:08 [rob@tenfoot.org.uk: set-face-attribute doesn't set default for new frames] Richard Stallman
2007-03-24 14:52 ` Chong Yidong
2007-03-25 17:28 ` Richard Stallman
2007-03-25 19:01 ` Chong Yidong
2007-03-26 20:27 ` Rob Walker
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).