From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69598: 29.2; colour support based on $TERM value not terminfo database Date: Thu, 07 Mar 2024 19:47:05 +0200 Message-ID: <86sf120w9y.fsf@gnu.org> References: <202403062301.426N1ms7277304@zeus.jtan.com> <86o7bqk06u.fsf@gnu.org> <202403071732.427HWear369011@zeus.jtan.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17028"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69598@debbugs.gnu.org To: chohag@jtan.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 07 18:48:43 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1riHrH-0004Ci-38 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Mar 2024 18:48:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1riHr9-0005et-HA; Thu, 07 Mar 2024 12:48:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1riHr4-0005eM-UQ for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 12:48:32 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1riHr4-0005wc-MQ for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 12:48:30 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1riHra-0005n3-6t for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 12:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Mar 2024 17:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69598 X-GNU-PR-Package: emacs Original-Received: via spool by 69598-submit@debbugs.gnu.org id=B69598.170983368821986 (code B ref 69598); Thu, 07 Mar 2024 17:49:02 +0000 Original-Received: (at 69598) by debbugs.gnu.org; 7 Mar 2024 17:48:08 +0000 Original-Received: from localhost ([127.0.0.1]:54837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riHqi-0005iY-A9 for submit@debbugs.gnu.org; Thu, 07 Mar 2024 12:48:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riHqg-0005hm-4S for 69598@debbugs.gnu.org; Thu, 07 Mar 2024 12:48:07 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1riHq3-0005hM-Tt; Thu, 07 Mar 2024 12:47:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8t2ipw6rS2//Hduv1trl5GHzZ00zQeqA8eG3aymptFU=; b=ILYJmuy9ZbvB WUi4HwUZDhPitzfXedGmzSLxMnFkmmApRKnM6Qc7qVr8ecrD4GjKokvsiw5HtXdscp1ym8gpERiQc vMZ6PZV1ozmnS7x7Buh9eQ7re3Koj4olhchBfN3pWVOjEtgi1OgLxI6EtDj83fSsHXW2YZ6oXRb3e eTw+Tjg41t2n2GDSoWdqZs1ojjPwLkDDYNWSXOBj2TuOHxm/SwkdS0X/9O9RDIBz9f7p9AiHZ5zy0 EJEf0ZQb/HtIvyJb6CfHl9SgUqn+Ng+jrwVVwVJrGG476xlnnE2abZP/WZeUwrhDBprbW/kXhJ1kO PSVZUtQeZ7bjs48eymZGzA==; In-Reply-To: <202403071732.427HWear369011@zeus.jtan.com> (chohag@jtan.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281182 Archived-At: > From: chohag@jtan.com > cc: chohag@jtan.com, 69598@debbugs.gnu.org > Comments: In-reply-to Eli Zaretskii > 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.