5
votes

I just upgraded my Ubuntu laptop from 12.04 to 12.10.

In 12.04, running emacs -nw opened emacs in terminal mode using the terminal color scheme (background, foreground, ..., especially it keeped my transparent terminal background).

Now in 12.10, running the same command results in emacs opened in the terminal with an other color scheme (with a gray background). How can I tell emacs to keep my terminal color scheme ?

2
thanks for the link, but I don't want to have to deal with custom color theme edition but just indicate to emacs to re-use my gnome terminal colors - Manuel Selva
@ManuelSelva, do you have custom colors defined in your .emacs for when you are not running with -nw ? if so, you could ignore them if you change your .emacs to check the variable `window-system is bound with a non-ni and conditionally skip them under that condition. (in ubuntu i would expect this value to be bound to "X" for X-window system. at the very worst, you should be able to use "emacs -q" which will ignore your .emacs altogether, but should give you the terminal colors you want with all default behavior. - john.k.doe
@john.k.doe No I don't have any custom colors defined in my .emacs. - Manuel Selva

2 Answers

2
votes

Thanks to https://stackoverflow.com/users/774691/john-k-doe's comment, I finally get the reason why my emacs -nw appeared like that.

I edited the font size (for the default face) in an emacs window (launched without the -nw option) and then saved this new setting using the menu entry Options -> Save Options. This action modified my ~/.xemacs/custom.el file loaded by default in my ~/.emacs file. The modification included background and foreground properties for the default face with the value used in "Window" mode.

To solve the issue, I just removed this custom entry from the custom.el file.

0
votes

I'm not sure that there is a sensible answer to this. After all, a gnome terminal colour theme lists three "colours": (1) Text, (2) Background (3) Bold.

The way Emacs works is that every bit of text is given a "face". A colour theme is a mapping of faces to colours. There are more than three faces...