3

TERM is set to screen. I tried with screen-256color, but then the colors went really nuts. I also tried xterm, linux, and some others (that I could think of, not really thinking) but screen is the closest I got - albeit not quite - to "pure" tty Emacs colors.

As you see below, the colors work (top window), only for some reason they show up incorrect as cyan, in the case of Emacs-w3m.

Also, probably related, the block, solid-color cursor that I had, got replaced by an underscore. I prefer the color-shifting block cursor - not the least because it is much easier to spot after a search. (Note: the cursor problem does not show below as I used the shell command to get the screenshots.)

in_tmux not_in_tmux

2
  • Your *Faces* display doesn't have the one that's different visible. Is there any way to show the actual definition of the configured color instead of the sample text? Also, how do you configure the cursor?
    – Random832
    Nov 20, 2013 at 14:23
  • i know i am not answering the question directly, but i lost most reasons to run emacs in tmux by using TRAMP - you could simply open and work on remote files, as well as open shell's into remote locations youtube.com/watch?v=UjPasLGWzD0
    – Shlomi
    Nov 28, 2013 at 23:11

1 Answer 1

1

The terminal emulator you are using may also be screwing with the colors. I was having a color issue with vim in 256 color mode and it ended up being konsole terminal emulator with KDE was changing the default colors and it was making the vim colorshemes all screwy.

I ended up having to manually set the colors to the expected colors to get it to work with it.

I had best luck with the following:

  1. screen-256color
  2. force tmux to assume 256 colors: tmux -2
  3. use urxvt for terminal
  4. And the following added to .Xresources

~/.Xresources

URxvt*background:  black
URxvt*foreground:  white
URxvt*font:  xft: Inconsolata:size=12
URxvt*transparent: false
URxvt*depth: 32

Try the following script to see if you are indeed getting 256 colors.

#!/bin/bash
#
#   This file echoes a bunch of color codes to the 
#   terminal to demonstrate what's available.  Each 
#   line is the color code of one forground color,
#   out of 17 (default + 16 escapes), followed by a 
#   test use of that color on all nine background 
#   colors (default + 8 escapes).
#

T='gYw'   # The test text

echo -e "\n                 40m     41m     42m     43m\
     44m     45m     46m     47m";

for FGs in '    m' '   1m' '  30m' '1;30m' '  31m' '1;31m' '  32m' \
           '1;32m' '  33m' '1;33m' '  34m' '1;34m' '  35m' '1;35m' \
           '  36m' '1;36m' '  37m' '1;37m';
  do FG=${FGs// /}

  echo -en " $FGs \033[$FG  $T  "

  for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
    do echo -en "$EINS \033[$FG\033[$BG  $T  \033[0m";
  done

  echo;
done
echo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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