Emacs/Xterm Color Annoyance on Linux

Emacs/xterm color annoyance on Linux

The color brightwhite looks ok on my Emacs (which is running under a terminal, not X). On RHEL5 I have my TERM environment variable set to xterm-256color. If it's working correctly, you should be able to run these scripts and see 256-color output. Under Emacs, you should see a reasonably smooth color ramp (no obviously duplicated colors) when you do M-x list-colors-display. If not, you are probably missing the right termcap entry (try installing the libtermcap-devel package, I think).

If I change TERM to xterm-color, then brightwhite comes out a bit gray in the output of list-colors-display.

I'm not sure about RHEL4.

How do I set up my Linux X terminal so that Emacs has access to 256 colors?

According to this you need ncurses-term library in addition to setting TERM to xterm-256color.

Okay, this has some other things to try like :

The xterm in Ubuntu Edgy does not advertise 256 color support by
default. To fix this you need to install a 256 color terminfo entry,
and tell xterm to use it:

apt-get install ncurses-term
echo XTerm.termName: xterm-256color \
>>~/.Xdefaults
xrdb -merge ~/.Xdefaults

and :

So you need a file term/screen-256color.el in your load-path.  Emacs
22 expects it to contain a terminal-init-screen defun. Emacs 21
expects it to contain a bunch of top-level forms. Here's what I use:

;;; This is for GNU Emacs 22
(defun terminal-init-screen ()
"Terminal initialization function for screen."
;; Use the xterm color initialization code.
(load "term/xterm")
(xterm-register-default-colors)
(tty-set-up-initial-frame-faces))

;;; This is for GNU Emacs 21
(if (= 21 emacs-major-version)
(load "term/xterm-256color"))

For Emacs 21, you also need to install the xterm-256color.el file from

http://www.splode.com/~friedman/software/emacs-lisp/src/term/xterm-256color.el

How do I change the color settings in emacs23 running in a terminal emulator?

Setting TERM=xterm-256color is what you need.

Open emacs through variable with different color

I found the answer. Sorry for the trouble.

Right thing to do was:

TEXT_EDITOR=emacs" "'-fg'" "'red'

Thanks for help.

How to preserve emacs colors from regular terminal to gnu screen

My suspicion is that, while your terminal may be compiled with support for more than the standard 16 colors, your particular version of GNU screen may not be. I'm not very familiar with OSX, but on Linux I'd check whether the output of tput colors differs between a plain terminal and one running screen (I'd expect there to be some OSX equivalent if tput is not available). If it does, you may need to install (or manually compile) a different build of screen that includes support for additional colors (normally, 256 is the maximum, but 88 is also common, while 16 is the default minimum).

Edit: Ultimately, the correct solution proved to be manually setting the $TERM environment variable (see comments below).

In Emacs, how do I create for a certain color constant to be mapped to another color?

I think you should start with a Color theme package and choose a color theme you like.

Later you can adjust certain colors by doing M-x customize-face. The command M-x list-colors-display will help you to pick a right color.

EDIT: Do you run Emacs on text terminal? Then you may try to use tty-color-define. Unfortunately I cannot test it because I don't have Emacs on the terminal.

(defun my-define-red()
(interactive)
(tty-color-define "red" 1 (list 32000 12000 12000)))

Why does emacs in an xterm on a Mac interpret c-h as backward-delete-char?

Found the solution here:
http://www.ibb.net/~anne/keyboard/keyboard.html#Xterm

Apply palm, with force, to forehead.

Many thanks to those that responded.



Related Topics



Leave a reply



Submit