Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How make emacs console mode inherit shell colors

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 ?

like image 551
Manuel Selva Avatar asked Nov 04 '22 05:11

Manuel Selva


1 Answers

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.

like image 54
Manuel Selva Avatar answered Nov 05 '22 18:11

Manuel Selva