From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: chohag--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69598: 29.2; colour support based on $TERM value not terminfo database Date: Thu, 07 Mar 2024 19:59:17 +0000 Message-ID: <202403071959.427JxJTO382071@zeus.jtan.com> References: <202403062301.426N1ms7277304@zeus.jtan.com> <86o7bqk06u.fsf@gnu.org> <202403071732.427HWear369011@zeus.jtan.com> <86sf120w9y.fsf@gnu.org> <202403071831.427IVMWs374766@zeus.jtan.com> <86plw5268n.fsf@gnu.org> Reply-To: chohag@jtan.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16564"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69598@debbugs.gnu.org, chohag@jtan.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 08 01:38:00 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 1riOFL-00046f-FN for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Mar 2024 01:37:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1riOEy-0003qT-Jn; Thu, 07 Mar 2024 19:37:36 -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 1riOEv-0003oK-7W for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 19:37:33 -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 1riOEt-0000ts-Uo for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 19:37:31 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1riOFP-00031M-Kw for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 19:38:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: chohag@jtan.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Mar 2024 00:38:03 +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.170985824411509 (code B ref 69598); Fri, 08 Mar 2024 00:38:03 +0000 Original-Received: (at 69598) by debbugs.gnu.org; 8 Mar 2024 00:37:24 +0000 Original-Received: from localhost ([127.0.0.1]:55529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riOEl-0002zT-Hh for submit@debbugs.gnu.org; Thu, 07 Mar 2024 19:37:24 -0500 Original-Received: from 236-he.filtered.junkemailfilter.com ([184.105.182.236]:35426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riJuJ-0004J9-2p for 69598@debbugs.gnu.org; Thu, 07 Mar 2024 15:00:00 -0500 Original-Received: from [184.105.182.254] (port=41228 helo=mailout.jtan.com) (helo=mailout.jtan.com) by outscan.junkemailfilter.com with esmtp (JEF) id 1riJth-0006QT-Ls (on interface=184.105.182.200); Thu, 07 Mar 2024 11:59:21 -0800 Original-Received: from mail.jtan.com (localhost [127.0.0.1]) by mailout.jtan.com (Postfix) with ESMTP id 345E4F88590; Thu, 7 Mar 2024 19:59:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=jtan.com; s=jtan8; t=1709841561; bh=v69virKTIBwqkk3cDpu9T6PQrbN0IeibWE/taZGkAsE=; h=From:To:cc:Subject:References:Date:From:Reply-To:To:Date:Subject; b=NMETPNMyaZl6fRb4oPol8nFKjrO23lRcZSCjuttiXBf/HFK4f9/27UEVJgTQosKxl psYVxuwLIMAaQaJmpVoP3zjy08SzOadXWOqGaB1vEwTy1eyXxpmF030+STRQ69bZil vNzuJtSRVPtibEd1TjoZztV91lUkEJ437Cl94XxUuM/HbhtnZKQ62Ao7xd/+WXizkS hy4Cbqr+0X+IPCi8yx7cgkRlc5XwS20yizcKF259AY0AY/GpIFRAtyw+rK8Hxr9gN5 P8ZCFeO4qh+0Q9sAjnY4b8fVZ8Z+2sNgdEow1+HXk/LNp+WMaXa0KeZGm4jUkP9ddA Q+nY1SsVUbT5A== Original-Received: from zeus.jtan.com (localhost [127.0.0.1]) by mail.jtan.com with ESMTPS id 427JxKRE382072 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 7 Mar 2024 19:59:21 GMT Original-Received: (from chohag@localhost) by zeus.jtan.com (8.15.2/8.14.4/Submit) id 427JxJTO382071; Thu, 7 Mar 2024 19:59:19 GMT In-reply-to: <86plw5268n.fsf@gnu.org> Comments: In-reply-to Eli Zaretskii message dated "Thu, 07 Mar 2024 21:26:32 +0200." Content-ID: <55126.1709841557.1@llama.datum> X-Spamfilter-host: outscan.junkemailfilter.com - http://www.junkemailfilter.com X-Key-ID: ZWxpekBnbnUub3JnIGNob2hhZ0B6ZXVzLmp0YW4uY29tIDIwMjQtMDMtMDcgMTE6NTk6MjEuODcwIDFyaUp0aC0wMDA2UVQtTHM= X-Content-flags: access available certainly computers date dated direct discards discovers email-adr here information message percent point preferably problem re records reply requests supplies term terminal terminfo time-ref understand unique working works X-Domain-list: jtan.com gnu.org X-Outscan: http://www.junkemailfilter.com X-Mailman-Approved-At: Thu, 07 Mar 2024 19:37:20 -0500 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:281196 Archived-At: Eli Zaretskii writes: > > 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 > { > ... // calls to terminfo database requests > } > #endif I understand. I haven't stepped through that piece of code in an emacs binary but modulo terminfo bugs (which I'm going to assume for now aren't happening) but you can see from it that it looks up strings in the database and records the result. Unless emacs has done anything unusual to load that database (very unlikely) it will 100% return the strings in the terminfo entry it's directed to look at. So it certainly (although I have not tried it) is not a problem in that piece of code. > By contrast, it sounds like you are only talking about a terminfo > entry that redirects to another entry. Yes, the problem can be isolated to creating a new terminfo entry and using it. But the problem is not with the terminfo entry itself. The new entry is an exact duplicate of a working terminfo entry (where working means that list-colors-display lists 256 named colours) and it only works if the new entry has a name which begins "xterm-". This means that somewhere between running the code above which does detect that 16M colours are available, emacs discards that information and instead (seems to) decide that support is there based on the name of the terminal in $TERM. > No, I cannot try that on the systems to which I have access. Maybe Any system with xterm and emacs should be able to reproduce the problem. I don't know how any other terminal in which emacs detects direct colour support would perform. > someone else could, preferably someone who knows more than I do about > terminfo. It is almost certainly related to either how terminfo is used, or because the information terminfo supplies is ignored at a critical point. Matthew