I use xterm and set its appearance to ~/.Xdefaults :
XTerm*background: paleTurquoise XTerm*foreground: black
I also use emacs, but set its appearance differently in ~/.emacs :
(set-background-color "black") (set-foreground-color "yellow")
I usually run emacs in a terminal emulator using emacs -nw instead of creating a separate X window. For some reason this does not work properly for emacs23; instead, emacs preserves the pale turquoise background of my xterm window. Looking at what's new in emacs23 , I noted that:
** When starting in a new xterm (newer than version 242), Emacs asks xterm what the background color is, and if necessary adjusts the faces for a dark background (the current default is to consider background lighting).
So this is a feature, not a mistake? In any case, is there any way I can tell emacs23 to ignore the xterm background settings when running in console mode and use ~/.emacs settings instead?
I also note that:
- It works fine in emacs23 running in a separate X window (without the
-nw option). - It worked great in emacs22; and I'm not quite sure if I need to use emacs23 ...
- Running
Mx set-background-color inside emacs23 -nw has no effect. - This is not just xterm: the same problem exists with
$TERM=cygwin , for example.
UPDATE: the best answer is to use the -fg and -bg command line -bg ...
source share