As far as I can tell from browsing around, I should be getting 256 colors in my Emacs, but I'm not.

I'm running CentOS 5.4 on an ec2 instance. I'm running Putty 0.60 on Windows 7. Putty is set to send xterm-256color for its terminal string. Putty is set to allow 256 colors. On CentOS, my $TERM is set to xterm-256color.

tput colors shows 256. I recompiled Emacs to 23.2, making sure to install libtermcap-devel beforehand, because someone claimed they needed that. But still, when I M-x list-colors-display in Emacs, it only shows 8 colors.

  • 1
    What happens if you start emacs with --colors=256? – Dennis Williamson Jan 21 '11 at 21:00
  • Thanks for the suggestion. As it happens, got it working a couple minutes after posting. I did two things, so it's one or the other: 1) Turned on global font lock and 2) ran an elisp script I found on emacswiki that "filled in" the color names or some dumb thing. – mwt Jan 21 '11 at 22:09
  • "Putty is set to send xterm-254color" is a typo, right? and you could also use .. vim :) /me pats his shiney 256-color-vim ... – akira Jan 22 '11 at 6:26
  • 1
    @akira: It should be 256, but no editor wars please. – grawity Jan 22 '11 at 14:48
  • 4
    mind to answer your own question and accept your own answer? that would close this open question :) – akira Jan 31 '11 at 15:33

The questioneer solved this:

  1. Turn on global font lock.

  2. Run an elisp script you can find on the emacswiki that "fills in" the color names, etc...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.