Bug 196389

Summary: emacs forgets face color customizations with FC5 Xserver?
Product: [Fedora] Fedora Reporter: James Ralston <ralston>
Component: emacsAssignee: Chip Coldwell <coldwell>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-06-13 22:26:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
My .emacs file.
none
My xorg.conf file. none

Description James Ralston 2006-06-22 21:22:47 UTC
I've customized (and saved) my mode-line using customize-face.  Here's what's in
my .emacs:

(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(mode-line ((t (:background "navy" :foreground "yellow" :box (:line-width -1
:style released-button))))))

If I start up a new Emacs window (under X11), that initial window contains a
correctly-customized mode-line, and if I examine the values via customize-face,
they are correct:

[X] Foreground: Value Menu Color: yellow      (sample)
[X] Background: Value Menu Color: navy        (sample)

The problem is that *only* that initial window contains the correct mode-line
customizations.  If I open any other X11 windows, the mode-line customizations
are lost.  In such a window, if I examine the values via customize-face, they
are incorrect:

[X] Foreground: Value Menu Color: #000000     (sample)
[X] Background: Value Menu Color: #ede9e3     (sample)

I can change the values to what they should be (yellow and navy, respectively),
which will reset the window in question, but the same thing happens if I open
another window.

This behavior is new with Fedora Core 5.  Furthermore, from experimenting, the
problem actually follows the X server, not Emacs.  That is, all versions of
Emacs (FC4, FC5, RHEL4, et. al.) exhibit this behavior when displaying on my FC5
X server.  On any other platform's X server (e.g., FC4, RHEL4), no version of
Emacs displays this behavior.

So, it would appear to be that there's some quality to the FC5 X server that
Emacs doesn't like.  Unfortunately, I don't know what that would be, or how to
fix it.  :(

$ rpm -q emacs xorg-x11-server-Xorg
emacs-21.4-14
xorg-x11-server-Xorg-1.0.1-9.fc5.1.1

Comment 1 James Ralston 2006-06-22 21:23:35 UTC
Created attachment 131391 [details]
My .emacs file.

Comment 2 James Ralston 2006-06-22 21:24:26 UTC
Created attachment 131392 [details]
My xorg.conf file.

Comment 3 James Ralston 2007-06-13 22:26:08 UTC
This is fixed in emacs-22.0.990-2.fc7 and xorg-x11-server-Xorg-1.3.0.0-8.fc7, in F7.

This problem was actually a new (but broken) feature: Emacs was trying to ensure
that only the Emacs window which had the focus had color decorations on the mode
line; non-active windows had a grey mode line.  But something was broken; Emacs
would never color the mode line on any other window but the first one which was
opened.

At any rate, this works properly in F7; the Emacs window with the focus honors
the color customizations for the mode line; non-active windows are grey. 
(There's probably a way to disable the "only the window with the focus gets
color" feature, but I don't mind it.)