EMACS 24 Arch linux not supporting 256 color

859 Views Asked by At

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

3

There are 3 best solutions below

0
On

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")
0
On

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.

0
On

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.