Emacs ansi-term background color

I have a problem with changing the background color in ansi-term (as well as with the term - but the shell is fine). It displays the colors in the output, but the background color for the output is always white. Not the entire buffer, but only under the actual characters that were displayed. If I do something like

(add-hook 'ansi-term-mode-hook (lambda () (set-background-color "purple"))) 

This changes the background color of the buffer, but the output simply overrides it with its background color - white.

I also tried to find the face that he uses, so I can set it up by doing Cu Cx = to get the information on the face at the point - which works for everything else and even indicates where you change it well ... but in ansi i get it

  character: m (109, #o155, #x6d) preferred charset: ascii (ASCII (ISO646 IRV)) code point: 0x6D syntax: w which means: word category: .:Base, a:ASCII, l:Latin, r:Roman buffer code: #x6D file code: #x6D (encoded by coding system utf-8) display: by this font (glyph code) xft:-unknown-DejaVu Sans Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1 (#x50) Character code properties: customize what to show name: LATIN SMALL LETTER M general-category: Ll (Letter, Lowercase) There are text properties here: face (:background "white" :foreground "black") [back] 

I do not know where this is done. face (: background "white": foreground "black")

In addition, I used several themes that I know have ansi-term-color-vector (zenburn, etc.). I went through each sample in a customize-face, and it is not there where it is.

Any thoughts on how to override / set this so that it just has a transparent (or uninstalled) background, like everything else?

Thanks for any help.

+4
source share
1 answer

I'm not sure if I understand what is going on in your setup, but you can try installing:

 (setq term-default-bg-color "#211E1E") (setq term-default-fg-color "#AAAAAA") 

Try starting from scratch with a buffer to start a new term and check.

+8
source

Source: https://habr.com/ru/post/1316366/


All Articles