GNU bug report logs -
#69598
29.2; colour support based on $TERM value not terminfo database
Previous Next
Reported by: chohag <at> jtan.com
Date: Wed, 6 Mar 2024 23:24:02 UTC
Severity: normal
Found in version 29.2
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: chohag <at> jtan.com
> cc: chohag <at> jtan.com, 69598 <at> debbugs.gnu.org
> Comments: In-reply-to Eli Zaretskii <eliz <at> gnu.org>
> message dated "Thu, 07 Mar 2024 08:47:37 +0200."
> Date: Thu, 07 Mar 2024 17:32:38 +0000
>
> Eli Zaretskii writes:
> >
> > ** Emacs can support 24-bit color TTY without terminfo database.
> > If your text-mode terminal supports 24-bit true color, but your system
> > lacks the terminfo database, you can instruct Emacs to support 24-bit
> > true color by setting 'COLORTERM=truecolor' in the environment. This is
> > useful on systems such as FreeBSD which ships only with "etc/termcap".
> >
> > *** Emacs will now use 24-bit colors on terminals that support "Tc" capability.
> > This is in addition to previously-supported ways of discovering 24-bit
> > color support: either via the "RGB" or "setf24" capabilities, or if
> > the 'COLORTERM' environment variable is set to the value "truecolor".
> >
> > Did you try the COLORTERM=truecolor setting?
>
> I did now, in a new non-xterm terminal which does display all colours
> in emacs if $TERM is xterm-direct, and no joy (only lists 8 colours).
>
> I also performed this sequence on a linux (Debian 6.1.67-1 (2023-12-12))
> box in xterm (379) now that my cat has vacated it:
>
> $ export TERM=xterm-direct
> $ emacs -nw # Version 28.2
> $ echo 'fancy|Fancy Term,use=xterm-direct,' > fancy.info
> $ tic fancy.info
> $ export TERM=fancy
> $ emacs -nw
>
> In the first emacs, list-colors-display listed (I presume) 256
> colours. Certainly a lot and with the X names (it does not name
> them nicely if the terminal reports 256 colours). In the second it
> listed 8. Emacs has no configuration on that box (it's for compiling).
>
> I recall testing the RGB capability late last night despite not
> seeing it documented anywhere and that did not work. I shall
> experiment with the Tc capability and RGB more carefully and see
> what effect they have nevertheless I think the above sequence now
> repeated on two distinct operating systems is quite telling.
>
> Both systems have little or no customisation beyond the base image
> apart from installed packages. Certainly nothing that should affect
> terminfo (apart from running tic).
So I guess you will need to step with a debugger through the code in
term.c which discovers and initializes the color-related capabilities,
and see what's going on there on your system. Just from the
information you provided, it is very hard to guess what could be the
culprit.
Thanks.
This bug report was last modified 1 year and 63 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.