Subject: Re: bug#30917: 26.0.91; True color emacs in termite

From: Rami Ylimäki <[email-masked]>
Date: Wed, 28 Mar 2018 01:21:03 +0300

2018-03-26 18:14 GMT+03:00 Eli Zaretskii <[email-masked]>:

> > From: Oliver Laslett <[email-masked]>
> > Date: Mon, 26 Mar 2018 11:12:45 +0100
> > Cc: Eli Zaretskii <[email-masked]>, [email-masked]
> >
> > Rami, using TERM=xterm-direct2 worked! I tried many other options
> without success. Many thanks, it seems
> > that I have true colours. The only difference is that when I exit and
> return to the terminal, my prompt appears
> > at the bottom and emacs remains in the terminal buffer (i.e. i have to
> call $ clear to clear the terminal buffer). I
> > have tested and this is also happens with any command (e.g. `less`) so I
> guess related to using
> > TERM=xterm-direct2 and not emacs related.
>
> Rami, do you think this warrants addition of a few words to the FAQ?
>

Eli, I don't think we should go too much into the details of different TERM
specs in the Emacs FAQ. Version 26 FAQ explains how to use a custom TERM
spec. Version 27 FAQ also explains how to list the standard TERM specs so
that the user can choose one for their terminal. That should be enough. Of
course we could apply the version 27 FAQ changes to version 26 as well.

In this particular case, xterm-direct2 happens to define the [rs]mcup
capabilities in a different manner from other TERMs, which causes the
screen contents to be restored incorrectly in many terminals. However, I
wouldn't worry about this since use of xterm-direct2 seems to be deprecated
according to Terminfo sources.

Oliver, if you follow the instructions in version 27 FAQ (
http://git.savannah.gnu.org/cgit/emacs.git/tree/doc/misc/efaq.texi, search
for xterm-direct), you'll see how to list different direct mode terminals
on your computer. Choosing vte-direct for a vte-compatible terminal could
be one option to avoid the incorrectly restored screen.