Subject: Re: bug#44950: 28.0.50; 24-bit colors not used in terminal with emacsclient

From: tastytea <[email-masked]>
Date: Sun, 29 Nov 2020 21:01:45 +0100

On 2020-11-29 20:47+0200 Eli Zaretskii <[email-masked]> wrote:

> > Date: Sun, 29 Nov 2020 16:56:41 +0100
> > Jabber-ID: [email-masked]
> > From: tastytea via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <[email-masked]>
> > 
> > When emacs is started as daemon by an init system (without COLORTERM
> > set), emacsclient -t only has 256 colors if TERM="tmux-256color" and
> > COLORTERM="truecolor".
> > When the daemon is started with COLORTERM="truecolor" everything is
> > fine (thanks to the patch in bug #41846).
> > tmux has no -direct or -24 bit terminal definition.
> > 
> > To reproduce:
> > * Start daemon: COLORTERM="" emacs --fg-daemon
> > * Start emacsclient:
> >   TERM="tmux-256color" COLORTERM="truecolor" emacsclient -t  
> 
> Isn't this a problem with the terminfo description of tmux?

I have the same problem with xfce4-terminal, rxvt-unicode and
alacritty. I can make it work in xfce4-terminal and alacritty by
setting TERM="xterm-direct" and ncurses-6.2-p20201003 has added support
for tmux-direct, but it doesn't just work.

And since emacs uses COLORTERM, I thought emacsclient could do the same?