【发布时间】:2015-02-14 21:30:14
【问题描述】:
我刚刚安装了realgud,这样我就可以使用trepan2 在emacs 中调试python。我立即遇到了一个严重的问题:comint 缓冲区中的一些颜色太浅了,几乎看不见:浅蓝色甚至是白色上的黄色。我该如何改变它们?
我尝试关闭缓冲区中的fontlock-mode,但颜色仍然存在。我也试过 M-x customize-faces,但我不清楚列出的数百张面孔中的哪一张被 realgud 使用。 (实际上有六个名字以“Realgud”开头,但似乎没有一个是相关的。)我翻阅了整个列表,但找不到任何黄色或浅蓝色的。我还尝试将主题更改为具有较暗背景的主题:这使黄色可见,但随后深色消失了。
编辑:按照法律列表的建议,这里是C-u C-x = 的结果。如果我理解正确,这意味着黄色是硬编码的。
position: 8445 of 9070 (93%), column: 39
character: 0 (displayed as 0) (codepoint 48, #o60, #x30)
preferred charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x30
syntax: w which means: word
category: .:Base, a:ASCII, l:Latin, r:Roman
to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
buffer code: #x30
file code: #x30 (encoded by coding system utf-8-unix)
display: by this font (glyph code)
x:-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1 (#x30)
Character code properties: customize what to show
name: DIGIT ZERO
general-category: Nd (Number, Decimal Digit)
decomposition: (48) ('0')
There is an overlay here:
From 8437 to 8450
face (foreground-color . "yellow")
modification-hooks (ansi-color-freeze-overlay)
There are text properties here:
field output
fontified t
front-sticky (field inhibit-line-move-field-capture)
inhibit-line-move-field-capture t
rear-nonsticky t
[back]
说实话,我已经对realgud 失去了兴趣。尽管增强pdb 的想法听起来不错,但trepan2 和realgud 似乎有多个痛苦的缺陷,使它们几乎无法使用。
谢谢。
【问题讨论】:
-
将光标放在具有特别感兴趣的颜色的任何点上并输入
C-u C-x =,这将告诉您该位置存在/存在哪些面孔。然后你可以M-x customize-face。 -
也许调整
ansi-color-names-vector的设置会有所帮助? stackoverflow.com/a/13769063/2112489 要查看当前设置,您可以键入:M-x describe-variable RET ansi-color-names-vector RET -
也许,但是改变 ANSI 颜色的含义,这可能在
emacs的其他地方使用,似乎是一个激进的步骤。如果realgud运行良好,我可能会考虑,但还有其他问题。 -
我可能是错的,但我不相信
realgud负责颜色设置 - 快速 grep 显示realgud使用ansi-color-filter-apply可能会留下面包屑通往ansi-color-names-vector的小径。但是,我只花了几分钟的时间来研究这个问题。我在realgud的短暂一瞥中看到的唯一颜色是面孔:debugger-running;debugger-not-running;realgud-overlay-arrow1;realgud-overlay-arrow2;realgud-overlay-arrow3;realgud-line-number;realgud-file-name;realgud-backtrace-number. -
@LeonAvery 抱歉,您失去了兴趣。当您在运行的任何软件中发现问题时,请考虑在项目中打开问题。对于这个项目,问题跟踪器是 github.com/rocky/emacs-dbgr/issues 和 github.com/rocky/python2-trepan/issues 。谢谢。
标签: python emacs emacs-faces