-   Linux - Software (
-   -   Why can't I change Emacs color settings? (

SuperRob2000 08-13-2004 07:26 PM

Why can't I change Emacs color settings?
For some reason, the color settings in my .emacs file always get overriden to white on black. For example, if I set my background color to yellow in .emacs, upon startup I will see the background flash yellow and then change right back to black.

I've checked to make sure I am only making one call to set-background-color in my .emacs file. It looks like there is something that's happening after the .emacs file is read that loads a new set of colors.

I am using red hat linux 9.

foo_bar_foo 08-14-2004 12:16 AM

yea it's a little weird -- this is what i do and it works
first to do background foregrond color in emacs in a file in your home dir first
used to be
so now i make both :) cause i can't remember which
read it in without logging out with "xrdb ~/.Xdefaults"

emacs.background: black
emacs.foreground: wheat
emacs.pointerColor: Orchid
emacs.cursorColor: Orchid
emacs.bitmapIcon: on
emacs.font: *fixed-bold-r-*-15-*-*
emacs.geometry: 107x40

ok then i put the background color i want at the very end of ~/.emacs

(setq initial-frame-alist
  '(background-color . "#010B45")

SuperRob2000 08-14-2004 02:05 AM

I read in the .Xdefaults file with xrdb and set the bg color at the very end of the .emacs file, but it didn't work. I can watch the bg color progress as it initializes. It starts out with the bg color I set in my .Xdefaults file. It then changes to the color I set in .emacs (If i set it multiple times, I can see it flash each of the colors). It then always changes to white font on black background. I can then manually change the background with the set-background-color command with no problem.

The top menu bar ("File Edit Options Buffers Tools Help") always keeps the color settings from the .Xdefaults file.

Any suggestions?

EvilGraham 08-27-2004 08:07 AM


I had this problem and it turns out that the culprit is KDE, which is set by default to apply its colours to non-KDE apps.

I found the solution here:

I hope this helps, I am now enjoying Emacs with a lovely "papaya whip" background.


All times are GMT -5. The time now is 08:48 PM.