all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: chohag--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 69598@debbugs.gnu.org, chohag@jtan.com
Subject: bug#69598: 29.2; colour support based on $TERM value not terminfo database
Date: Thu, 07 Mar 2024 19:59:17 +0000	[thread overview]
Message-ID: <202403071959.427JxJTO382071@zeus.jtan.com> (raw)
In-Reply-To: <86plw5268n.fsf@gnu.org>

Eli Zaretskii writes:
> > From: chohag@jtan.com
> > cc: chohag@jtan.com, 69598@debbugs.gnu.org
> > Comments: In-reply-to Eli Zaretskii <eliz@gnu.org>
> >    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






  reply	other threads:[~2024-03-07 19:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 23:01 bug#69598: 29.2; colour support based on $TERM value not terminfo database chohag--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-07  6:47 ` Eli Zaretskii
2024-03-07 17:32   ` chohag--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-07 17:47     ` Eli Zaretskii
2024-03-07 18:31       ` chohag--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-07 19:26         ` Eli Zaretskii
2024-03-07 19:59           ` chohag--- via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-03-07 20:10             ` Eli Zaretskii
2024-03-07 21:45               ` chohag--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-07 21:50                 ` chohag--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-08  7:11                 ` Eli Zaretskii
2024-03-08 11:36                   ` chohag--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-08 12:22                     ` Eli Zaretskii
2024-03-08 14:23                       ` chohag--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-08 15:09                         ` Eli Zaretskii
2024-03-08 18:52                           ` chohag--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-08 19:50                             ` Eli Zaretskii
2024-03-08 21:13                               ` chohag--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-09  7:18                                 ` Eli Zaretskii
2024-03-21  8:33                                   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202403071959.427JxJTO382071@zeus.jtan.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=69598@debbugs.gnu.org \
    --cc=chohag@jtan.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.