I'm using emacs 24 on OS X and have the strange problem that I'm unable to see any color codes. Emacs seems to just ignore them. My motivation is to see colored output from cmake, llvm and the googletest framework for a C++ project. I'd like to see the colors in compile mode, however it would probably suffice to fix the display for comint or shell modes.
My problem differs from many others in the fact that I can neither see the raw ansi color sequences nor the colors they should produce. It seems that the codes are just stripped away from the output, but I can't find out where.
I tried out the obvious things like
- requiring
'ansi-color
- turning
ansi-color-for-comint-mode
on - unsuccessfully trying to produce any ansi-colored output in either shell, eshell, multi-term, ansi-term
- setting my TERM to various settings, including
xterm
,xterm-color
,xterm-256color
all to no avail.
Edit:
My emacs configuration is divided into my personal settings and a fork of emacs prelude in which I modified some minor settings, mainly adding packages
echo
is colored, probably by the regularcompile-mode
highlighting. – Thaneemacs -q
) to see if you get colors? – Warrenne/usr/local/bin
.. Could there be anything in there that overrides the shell you expect? Try to load the ansi color setting as last thing in you dot emacs.(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t) (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
– Cosec/usr/local/bin
contains a lot of links to programs installed with homebrew, but no zsh (my shell). The output should not depend on the shell anyway, because the color codes are stripped away from all command outputs, even thase that do not involve a shell. I added the lines at the end of my config, unfortunately everything stays the same. – Der