[英]How make emacs console mode inherit shell colors
I just upgraded my Ubuntu laptop from 12.04 to 12.10. 我刚刚将我的Ubuntu笔记本电脑从12.04升级到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). 在12.04,运行emacs -nw
使用终端配色方案(背景,前景,...,特别是它保持透明终端背景)在终端模式下打开emacs
。
Now in 12.10, running the same command results in emacs opened in the terminal with an other color scheme (with a gray background). 现在在12.10中,运行相同的命令会导致在终端中打开emacs并使用其他颜色方案(灰色背景)。 How can I tell emacs to keep my terminal color scheme ? 如何告诉emacs保留我的终端配色方案?
Thanks to https://stackoverflow.com/users/774691/john-k-doe 's comment, I finally get the reason why my emacs -nw
appeared like that. 感谢https://stackoverflow.com/users/774691/john-k-doe的评论,我终于明白了我的emacs -nw
出现的原因。
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
. 我在emacs
窗口中编辑了字体大小(对于默认面部)(在没有-nw
选项的情况下启动),然后使用菜单条目Options -> Save Options
保存了这个新设置。 This action modified my ~/.xemacs/custom.el
file loaded by default in my ~/.emacs
file. 此操作修改了我的~/.emacs
文件中默认加载的~/.xemacs/custom.el
文件。 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. 为了解决这个问题,我刚刚从custom.el
文件中删除了这个自定义条目。
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. 毕竟,gnome终端颜色主题列出了三种“颜色”:(1)文本,(2)背景(3)粗体。
The way Emacs works is that every bit of text is given a "face". Emacs的工作方式是每一个文本都被赋予“面子”。 A colour theme is a mapping of faces to colours. 颜色主题是面到颜色的映射。 There are more than three faces... 有三个以上的面孔......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.