0

I have looked all over and tried many things but I still can't get 256 color support in EMACS 24.

I tried this: emacs 256 colour support

But it doesn't work for me.

I have 256 color support in vim and in the terminal but not for emacs.

tput colors

output 256

but when I do list-colors-display in emacs it only shows 8

Current Setup:

Manjaro Linux (Arch Based)

guake terminal

zsh -> alias e='TERM=xterm-256color emacs -nw'

tmux

Community
  • 1
  • 1
arnm
  • 1,705
  • 2
  • 19
  • 30

3 Answers3

0

I ran into this with tmux because the TERM environment when I entered tmux was xterm and not xterm-256color. Once I fixed that emacs was fine.

Also colortest-256 is a handy tool for testing this.

stsquad
  • 5,712
  • 3
  • 36
  • 54
0

You can try to use this in .bashrc:

# 256 colors Tmux, "force tmux to assume the terminal supports 256 colours"
# See man tmux
alias tmux='tmux -2'

export TERM=xterm-256color

And in your .emacs:

;; "Terminal initialization function for screen."
;; Use the xterm color initialization code.
(load "term/xterm")
smonff
  • 3,399
  • 3
  • 36
  • 46
0

Try to insert this line in your ~/.Xresources file :

xterm*termName: xterm-256color

See archlinux wiki for more info : Xterm - ArchWiki

According to this page Hidden gems of xterm - Lukáš Zapletal, setting TERM variable manually is a bad practice.

Daishi
  • 12,681
  • 1
  • 19
  • 22