How to customize colors in realgud?

190 Views Asked by At

I've just installed realgud so that I can use trepan2 for debugging python in emacs. I immediately ran into a serious problem: some of the colors in the comint buffer are so light as to be almost invisible: light blue or even yellow on white. How do I change them?

I tried turning off fontlock-mode in the buffer, but the colors remain. I have also tried M-x customize-faces, but it is not obvious to me which of the hundreds of faces listed is being used by realgud. (There are six whose names actually begin with "Realgud", but none of them seems to be relevant.) I scrolled through the entire list, and I couldn't find any yellow or light blue ones. I also tried changing the theme to something with a darker background: that makes yellow visible, but then the dark colors vanish.

EDIT: Following lawlist's suggestion, here are the results of C-u C-x =. If I understand this right, it means yellow is hard-coded.

             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]

To be honest, I've lost interest in realgud anyway. Although the idea of an enhanced pdb sounds good, trepan2 and realgud seem to have multiple painful flaws that make them almost unusable.

Thanks.

1

There are 1 best solutions below

1
On

Color mappings come from ansi-term.

Here is what I have in my .emacs, but note I use a light (white) background. Note that although the main setting is ansi-term-color-vector, the color definitions for that have to come beforehand.

(defface term-color-darkgreen
  '((t :foreground "DarkGreen" :background "DarkGreen"))
  "Face used to render dark green color code."
  :group 'term)


(defface term-color-cadetblue
  '((t :foreground "CadetBlue" :background "CadetBAlue"))
  "Face used to render dark cadet blue color code."
  :group 'term)

(defface term-color-purple
  '((t :foreground "Purple" :background "Purple"))
  "Face used to render dark Purple color code."
  :group 'term)

(defface term-color-darkgoldenrod
  '((t :foreground "Darkgoldenrod" :background "Darkgoldenrod"))
  "Face used to render dark Darkgoldenrod color code."
  :group 'term)

(defface term-color-ivory4
  '((t :foreground "Ivory4" :background "Ivory4"))
  "Face used to render dark Ivory4 color code."
  :group 'term)


(setq ansi-term-color-vector
      [term
       term-color-black
       term-color-red
       term-color-darkgreen
       term-color-cadetblue
       term-color-blue
       term-color-purple
       term-color-darkgoldenrod
       term-color-ivory4])