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 21:26:32 +0200 Message-ID: <86plw5268n.fsf@gnu.org> References: <202403062301.426N1ms7277304@zeus.jtan.com> <86o7bqk06u.fsf@gnu.org> <202403071732.427HWear369011@zeus.jtan.com> <86sf120w9y.fsf@gnu.org> <202403071831.427IVMWs374766@zeus.jtan.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23400"; 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 20:28:09 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 1riJPV-0005pB-4q for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Mar 2024 20:28:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1riJP9-0002fc-4T; Thu, 07 Mar 2024 14:27:47 -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 1riJOw-0002ed-PN for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 14:27:34 -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 1riJOv-0008Vd-5h for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 14:27:33 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1riJPN-0000Zf-TR for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 14:28:01 -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 19:28:01 +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.17098396442153 (code B ref 69598); Thu, 07 Mar 2024 19:28:01 +0000 Original-Received: (at 69598) by debbugs.gnu.org; 7 Mar 2024 19:27:24 +0000 Original-Received: from localhost ([127.0.0.1]:54988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riJOl-0000Yd-U6 for submit@debbugs.gnu.org; Thu, 07 Mar 2024 14:27:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riJOh-0000YO-2Z for 69598@debbugs.gnu.org; Thu, 07 Mar 2024 14:27:22 -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 1riJO1-0008Nt-FK; Thu, 07 Mar 2024 14:26:37 -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=OxfDJQYYhQoTydtj3beUQEAUbEIjoHOcszT3dam94xQ=; b=VaHTzh0kPhR7 vXg6ZggF9RbAA9xQMnKX33wkvk+cvU1fbc55Gj3HUD5kn14xXNgb3fkoNVHIv16pI0vgR9RIV8hVy N4yZSfUgwckr6zsa87F08Qq2u/EU53Snp+iZrWSPwUyA6XF+ZnL+RTYFz6JpayKhr9gDlkWyaMmaI JYK1lLELCF2lvcenjoIOTlIPSm5ZWCygXmUd4vkaPZ0efjRJhgTUBhQ4bPdWTBzI2nhHKkCmE41Z7 OUGU3KrDBbMEdIh1ZAu9x6H8Rs7fgRjXylsFswKDbzA9wTIiCitrY2XXstzgMtd03x96K3w3crGJm S8fPxntBJiZdo8Vd48Ca0A==; In-Reply-To: <202403071831.427IVMWs374766@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:281187 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 19:47:05 +0200." > Date: Thu, 07 Mar 2024 18:31:20 +0000 > > Eli Zaretskii writes: > > 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, > > If there's something you would like me to look for then I can but > I am highly sceptical of the idea that it is isolated to something > unique about my computers here. I think there might be a misunderstanding. What meant was to see what happens in the function init_tty in this part of it: #ifdef TERMINFO { const char *fg = tigetstr ("setf24"); const char *bg = tigetstr ("setb24"); /* Non-standard support for 24-bit colors. */ if (fg && bg && fg != (char *) (intptr_t) -1 && bg != (char *) (intptr_t) -1) { tty->TS_set_foreground = fg; tty->TS_set_background = bg; tty->TN_max_colors = 16777216; } /* Standard support for 24-bit colors. */ else if (tigetflag ("RGB") > 0) { /* If the used Terminfo library supports only 16-bit signed values, tgetnum("Co") and tigetnum("colors") could return 32767. */ tty->TN_max_colors = 16777216; } /* Fall back to xterm+direct (semicolon version) if Tc is set (de-facto standard introduced by tmux) or if requested by the COLORTERM environment variable. */ else if ((tigetflag ("Tc") > 0) || ((bg = getenv ("COLORTERM")) != NULL && strcasecmp (bg, "truecolor") == 0)) { tty->TS_set_foreground = "\033[%?%p1%{8}%<%t3%p1%d%e38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%d%;m"; tty->TS_set_background = "\033[%?%p1%{8}%<%t4%p1%d%e48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%d%;m"; tty->TN_max_colors = 16777216; } } #endif By contrast, it sounds like you are only talking about a terminfo entry that redirects to another entry. > Did you confirm presence of the bug with the transcript I provided? No, I cannot try that on the systems to which I have access. Maybe someone else could, preferably someone who knows more than I do about terminfo.