简体   繁体   中英

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 ?

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.

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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM