GNU bug report logs - #30917
26.0.91; True color emacs in termite

Previous Next

Package: emacs;

Reported by: Oliver Laslett <oliver <at> cytora.com>

Date: Fri, 23 Mar 2018 15:46:02 UTC

Severity: normal

Found in version 26.0.91

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30917 in the body.
You can then email your comments to 30917 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#30917; Package emacs. (Fri, 23 Mar 2018 15:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Oliver Laslett <oliver <at> cytora.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 23 Mar 2018 15:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Oliver Laslett <oliver <at> cytora.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.91; True color emacs in termite
Date: Fri, 23 Mar 2018 10:30:47 +0000
[Message part 1 (text/plain, inline)]
I have some odd behviour in emacs 26.0.91 with my color theme.
I am using termite terminal emulator (with true color support) and
when running `emacs -nw` I get a broken theme using reduced color set.
However, if I run `sudo emacs -nw` my theme shows correctly.

As I understand, emacs determines true color support using terminfo. Is
emacs calling a command that may require root user privileges? How could
I debug this (apologies, long term emacs user, first bug report!)?



In GNU Emacs 26.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.28)
 of 2018-03-21 built on slaptop
Repository revision: f8cad16bb3272a8069b3008019f9d18516aef1a5
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
Recent messages:
Saving file /home/owl/.xmobarrc...
Wrote /home/owl/.xmobarrc
Saving file /home/owl/.xmobarrc...
Wrote /home/owl/.xmobarrc
Saving file /home/owl/.xmobarrc...
Wrote /home/owl/.xmobarrc
Saving file /home/owl/.xmobarrc...
Wrote /home/owl/.xmobarrc
Saving file /home/owl/.xmobarrc...
Wrote /home/owl/.xmobarrc

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
 --with-sound=alsa --with-modules --without-gconf --without-gsettings
 --with-x-toolkit=gtk3 --without-xaw3d --without-gpm --without-m17n-flt
 --without-imagemagick 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe
 -fstack-protector-strong -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
 -fuse-ld=gold''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 FREETYPE
LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS LIBSYSTEMD
LCMS2

Important settings:
  value of $LC_ALL: en_GB.UTF-8
  value of $LC_CTYPE:
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  ivy-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny format-spec rfc822 mml
mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
misearch multi-isearch colir color cl-extra help-mode dired
dired-loaddefs elec-pair dracula-theme ivy delsel ivy-overlay ffap
thingatpt finder-inf info package easymenu epg-config url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify lcms2 dynamic-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 164314 8575)
 (symbols 48 24991 2)
 (miscs 40 96 201)
 (strings 32 47287 1228)
 (string-bytes 1 1230703)
 (vectors 16 20042)
 (vector-slots 8 572714 10430)
 (floats 8 225 461)
 (intervals 56 260 146)
 (buffers 992 14))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30917; Package emacs. (Fri, 23 Mar 2018 19:06:02 GMT) Full text and rfc822 format available.

Message #8 received at 30917 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Oliver Laslett <oliver <at> cytora.com>, Rami Ylimäki
 <rami.ylimaki <at> vincit.fi>
Cc: 30917 <at> debbugs.gnu.org
Subject: Re: bug#30917: 26.0.91; True color emacs in termite
Date: Fri, 23 Mar 2018 22:04:58 +0300
> From: Oliver Laslett <oliver <at> cytora.com>
> Date: Fri, 23 Mar 2018 10:30:47 +0000
> 
> I have some odd behviour in emacs 26.0.91 with my color theme.
> I am using termite terminal emulator (with true color support) and
> when running `emacs -nw` I get a broken theme using reduced color set.
> However, if I run `sudo emacs -nw` my theme shows correctly.
> 
> As I understand, emacs determines true color support using terminfo. Is
> emacs calling a command that may require root user privileges? How could
> I debug this (apologies, long term emacs user, first bug report!)?

Rami, could you please look into this?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30917; Package emacs. (Fri, 23 Mar 2018 20:17:01 GMT) Full text and rfc822 format available.

Message #11 received at 30917 <at> debbugs.gnu.org (full text, mbox):

From: Oliver Laslett <oliver <at> cytora.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Rami Ylimäki <rami.ylimaki <at> vincit.fi>,
 30917 <at> debbugs.gnu.org
Subject: Re: bug#30917: 26.0.91; True color emacs in termite
Date: Fri, 23 Mar 2018 19:51:01 +0000
Rami, Eli,

I’ve realised that calling ‘sudo’ is just resulting in emacs with no theme and colours are inherited from my terminal theme (.Xresources). But the problem still remains that emacs is not detecting that termite is true colour. I have checked that terminfo defines setfg and setbg. 

Thanks



On 23 Mar 2018, at 19:04, Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Oliver Laslett <oliver <at> cytora.com>
>> Date: Fri, 23 Mar 2018 10:30:47 +0000
>> 
>> I have some odd behviour in emacs 26.0.91 with my color theme.
>> I am using termite terminal emulator (with true color support) and
>> when running `emacs -nw` I get a broken theme using reduced color set.
>> However, if I run `sudo emacs -nw` my theme shows correctly.
>> 
>> As I understand, emacs determines true color support using terminfo. Is
>> emacs calling a command that may require root user privileges? How could
>> I debug this (apologies, long term emacs user, first bug report!)?
> 
> Rami, could you please look into this?
> 
> Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30917; Package emacs. (Sat, 24 Mar 2018 00:20:02 GMT) Full text and rfc822 format available.

Message #14 received at 30917 <at> debbugs.gnu.org (full text, mbox):

From: Rami Ylimäki <rami.ylimaki <at> vincit.fi>
To: Oliver Laslett <oliver <at> cytora.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 30917 <at> debbugs.gnu.org
Subject: Re: bug#30917: 26.0.91; True color emacs in termite
Date: Sat, 24 Mar 2018 02:19:22 +0200
[Message part 1 (text/plain, inline)]
It seems that by default Termite sets TERM=xterm-termite, which doesn't
support true color. However, since Termite uses libvte, it supports true
color with semicolon separators, just like Gnome Terminal. If you have the
latest Terminfo installed, you can launch Emacs with: TERM=xterm-direct2
emacs -nw. At least that worked for me under Termite. If this doesn't work,
there are more detailed instructions in Emacs FAQ node Common requests
> Colors on a TTY.

2018-03-23 21:51 GMT+02:00 Oliver Laslett <oliver <at> cytora.com>:

> Rami, Eli,
>
> I’ve realised that calling ‘sudo’ is just resulting in emacs with no theme
> and colours are inherited from my terminal theme (.Xresources). But the
> problem still remains that emacs is not detecting that termite is true
> colour. I have checked that terminfo defines setfg and setbg.
>
> Thanks
>
>
>
> On 23 Mar 2018, at 19:04, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> >> From: Oliver Laslett <oliver <at> cytora.com>
> >> Date: Fri, 23 Mar 2018 10:30:47 +0000
> >>
> >> I have some odd behviour in emacs 26.0.91 with my color theme.
> >> I am using termite terminal emulator (with true color support) and
> >> when running `emacs -nw` I get a broken theme using reduced color set.
> >> However, if I run `sudo emacs -nw` my theme shows correctly.
> >>
> >> As I understand, emacs determines true color support using terminfo. Is
> >> emacs calling a command that may require root user privileges? How could
> >> I debug this (apologies, long term emacs user, first bug report!)?
> >
> > Rami, could you please look into this?
> >
> > Thanks.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30917; Package emacs. (Mon, 26 Mar 2018 10:13:02 GMT) Full text and rfc822 format available.

Message #17 received at 30917 <at> debbugs.gnu.org (full text, mbox):

From: Oliver Laslett <oliver <at> cytora.com>
To: Rami Ylimäki <rami.ylimaki <at> vincit.fi>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 30917 <at> debbugs.gnu.org
Subject: Re: bug#30917: 26.0.91; True color emacs in termite
Date: Mon, 26 Mar 2018 11:12:45 +0100
[Message part 1 (text/plain, inline)]
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.

Many thanks
Oliver

On Sat, Mar 24, 2018 at 12:19 AM, Rami Ylimäki <rami.ylimaki <at> vincit.fi>
wrote:

> It seems that by default Termite sets TERM=xterm-termite, which doesn't
> support true color. However, since Termite uses libvte, it supports true
> color with semicolon separators, just like Gnome Terminal. If you have the
> latest Terminfo installed, you can launch Emacs with: TERM=xterm-direct2
> emacs -nw. At least that worked for me under Termite. If this doesn't work,
> there are more detailed instructions in Emacs FAQ node Common requests
> > Colors on a TTY.
>
> 2018-03-23 21:51 GMT+02:00 Oliver Laslett <oliver <at> cytora.com>:
>
>> Rami, Eli,
>>
>> I’ve realised that calling ‘sudo’ is just resulting in emacs with no
>> theme and colours are inherited from my terminal theme (.Xresources). But
>> the problem still remains that emacs is not detecting that termite is true
>> colour. I have checked that terminfo defines setfg and setbg.
>>
>> Thanks
>>
>>
>>
>> On 23 Mar 2018, at 19:04, Eli Zaretskii <eliz <at> gnu.org> wrote:
>>
>> >> From: Oliver Laslett <oliver <at> cytora.com>
>> >> Date: Fri, 23 Mar 2018 10:30:47 +0000
>> >>
>> >> I have some odd behviour in emacs 26.0.91 with my color theme.
>> >> I am using termite terminal emulator (with true color support) and
>> >> when running `emacs -nw` I get a broken theme using reduced color set.
>> >> However, if I run `sudo emacs -nw` my theme shows correctly.
>> >>
>> >> As I understand, emacs determines true color support using terminfo. Is
>> >> emacs calling a command that may require root user privileges? How
>> could
>> >> I debug this (apologies, long term emacs user, first bug report!)?
>> >
>> > Rami, could you please look into this?
>> >
>> > Thanks.
>>
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30917; Package emacs. (Mon, 26 Mar 2018 15:15:02 GMT) Full text and rfc822 format available.

Message #20 received at 30917 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Oliver Laslett <oliver <at> cytora.com>
Cc: rami.ylimaki <at> vincit.fi, 30917 <at> debbugs.gnu.org
Subject: Re: bug#30917: 26.0.91; True color emacs in termite
Date: Mon, 26 Mar 2018 18:14:52 +0300
> From: Oliver Laslett <oliver <at> cytora.com>
> Date: Mon, 26 Mar 2018 11:12:45 +0100
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 30917 <at> debbugs.gnu.org
> 
> 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30917; Package emacs. (Tue, 27 Mar 2018 22:22:01 GMT) Full text and rfc822 format available.

Message #23 received at 30917 <at> debbugs.gnu.org (full text, mbox):

From: Rami Ylimäki <rami.ylimaki <at> vincit.fi>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 30917 <at> debbugs.gnu.org, Oliver Laslett <oliver <at> cytora.com>
Subject: Re: bug#30917: 26.0.91; True color emacs in termite
Date: Wed, 28 Mar 2018 01:21:03 +0300
[Message part 1 (text/plain, inline)]
2018-03-26 18:14 GMT+03:00 Eli Zaretskii <eliz <at> gnu.org>:

> > From: Oliver Laslett <oliver <at> cytora.com>
> > Date: Mon, 26 Mar 2018 11:12:45 +0100
> > Cc: Eli Zaretskii <eliz <at> gnu.org>, 30917 <at> debbugs.gnu.org
> >
> > 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.
[Message part 2 (text/html, inline)]

bug closed, send any further explanations to 30917 <at> debbugs.gnu.org and Oliver Laslett <oliver <at> cytora.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 02 Apr 2019 00:28:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 30 Apr 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 363 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.