On Sun, Feb 19, 2017 at 7:43 AM Rami Ylimäki wrote: > > XTerm supports the direct color mode escape sequences, but approximates > colors. See > https://gist.github.com/XVilka/8346728#parsing-ansi-colour-sequences-but-approximating-them-to-256-palette > and https://gist.github.com/XVilka/8346728#now-supporting-truecolour for > details. > > Note that if you want to use XTerm, then using TERM=xterm-256color with > Emacs is enough, because 24-bit colors are approximated anyway. > Thanks for that explanation; it helps understand why the colors don't exactly look as in 24-bit mode. But that is much better than 256 colors! :) > I did not do a full bootstrap. But it still seems to work in uxterm in > tmux configured for 24-bits. > But it doesn't work directly in an xterm terminal. > > What debug information can I provide from the direct xterm session or > xterm+tmux session? > > > I haven't used tmux before, but I was able to make Emacs work in direct > color mode with following steps: > Wow! I cannot thank you enough! I really appreciate the effort you went through to help me get this working. > * Use a terminal that supports 24-bit colors (gnome-terminal). > Thanks. I will try that. But for now, with your fixed terminfo with Tc, it works great in xterm too. > * Compile tmux from https://github.com/tmux/tmux.git. The version > provided with Ubuntu doesn't support Tc-flag. > > * Use following terminfo source (add the Tc-flag and use semicolon > separators for tmux): > > $ cat terminfo-24bit.src > > # Use semicolon separators. > xterm-24bits|xterm with 24-bit direct color mode, > use=xterm-256color, > Tc, > > setb24=\E[48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm, > > setf24=\E[38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm, > Thank you! This fixed the color anomaly I reported in my last email. > * Compile the terminfo source, run tmux, set your TERM to xterm-24bits, > check that Tc is supported: > > $ tmux info | grep Tc > 199: Tc: (flag) true > > * Finally run Emacs under tmux. > Thanks again! :) -- Kaushal Modi