GNU bug report logs - #62237
28.1 or higher: 24-bit true color breaks colours in Emacsen built without X under GNU Screen

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Sebastian Tennant <sdt@HIDDEN>; dated Fri, 17 Mar 2023 09:42:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 20 Mar 2023 14:08:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 20 10:08:23 2023
Received: from localhost ([127.0.0.1]:55438 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1peGBT-0004AU-Em
	for submit <at> debbugs.gnu.org; Mon, 20 Mar 2023 10:08:23 -0400
Received: from mail-wm1-f52.google.com ([209.85.128.52]:51871)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1peGBS-0004AI-B9
 for 62237 <at> debbugs.gnu.org; Mon, 20 Mar 2023 10:08:22 -0400
Received: by mail-wm1-f52.google.com with SMTP id o32so1210642wms.1
 for <62237 <at> debbugs.gnu.org>; Mon, 20 Mar 2023 07:08:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20210112; t=1679321296;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=zh5CgKecM4zp/ZRcj00oYIo8azKBW/TcvGn5I3I6mf0=;
 b=lqy66K/o/lQaEtRfKqZnhuAlJZWWgV1RxZyvR7AQMM9SwWL4yG1mWR/XixHygl/mc1
 h5/MZKeBZc7SGT3UK8fFr0RBk5v5G43EJIPqZhiPKfRXY6ofBFII5umpQMYGix8QbWy2
 vc9m/EvPz9wOYOtrPKvhgJo2NvRo325VejJGBol3dGOzICTu2QuaXb8d3yhNcnoWmb6f
 tUGT82B3JAjH9Wt6ewhH3u/9GNyTUvsAdzVLFqtlWWpv0dZ1G5Fe+sgy266X96BC8kNf
 fKdGeb0UZrl3chJ19ZRe/qeEfHOep2tp03ZXskgYRhoQkGCmfqxYzSAN8F95aFBl3qty
 /Vtg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1679321296;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=zh5CgKecM4zp/ZRcj00oYIo8azKBW/TcvGn5I3I6mf0=;
 b=X2rrb6QhbBEEyJ3fePdxW+h2l9lX8McZoREHYwM1VaSsBBVbcdb2aDJ6x0nBevsqNs
 7F0vJATI5+GXcyWZSAahLp5Smu1sn68kctFPinAetuEU7RtpW/C9KExwg1I953ULdmDF
 h2DOBfBj/AWthZtewquIYTOSUnODF2zs4VOPdBelB/p1xQcLQ1Rjk6CKA7GtDK1Bpmrp
 sHGnks+L57hOvrgQ8pMIDYIf4ifu14JPkrEuioe9/8SPKeItpAo16PFiGnEL2MsGp3dj
 bSoCidxYxejHA8osW9ajrZMt30OlTKRgSQiqZHTWlUJmJC88TDQfGNR7KjkbMb6R5n4P
 f+cw==
X-Gm-Message-State: AO0yUKXsGb5dLJNlN/FJMHXm3ckE0Sm2RdgC6FeJC2OCJYFAgAOYE1Vf
 mIhUZrAMLYKN5u4WJxOZlysYZdJubiE=
X-Google-Smtp-Source: AK7set8/Rdh+8mtwezDbOA3hwf2JpFJwJWZG0LxDy4DX40y3GAZQBuENfy4oEInBWnoo5FAxnrmhrw==
X-Received: by 2002:a05:600c:3ca2:b0:3eb:3104:efec with SMTP id
 bg34-20020a05600c3ca200b003eb3104efecmr33771627wmb.16.1679321295746; 
 Mon, 20 Mar 2023 07:08:15 -0700 (PDT)
Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id
 e4-20020a05600c4e4400b003e8f0334db8sm16672519wmq.5.2023.03.20.07.08.14
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 20 Mar 2023 07:08:15 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
In-Reply-To: <83lejr8vq0.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 20 Mar
 2023 14:15:35 +0200")
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
 <871qlms7h3.fsf@HIDDEN> <83r0tmbb11.fsf@HIDDEN>
 <87sfe2qo5u.fsf@HIDDEN> <83lejub31r.fsf@HIDDEN>
 <87o7onrf8o.fsf@HIDDEN> <83lejr8vq0.fsf@HIDDEN>
Date: Mon, 20 Mar 2023 15:08:14 +0100
Message-ID: <877cvbqzw1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62237
Cc: sdt@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Mon, 20 Mar 2023 14:15:35 +0200, Eli Zaretskii <eliz@HIDDEN> said:

    >> From: Robert Pluim <rpluim@HIDDEN>
    >> Changing the interpretation of the user=CA=BCs TERM seems pretty rad=
ical to
    >> me, even if it will tend to improve users=CA=BC experience.

    Eli> If screen.FOO is not recognizable while FOO is, then we cannot
    Eli> possibly break anything by this change, however radical.  (But it
    Eli> sounds like I misunderstood what is going on here, see below.)

I=CA=BCm sure I don=CA=BCt entirely understand what=CA=BCs going on either

    >> >> I guess we could do something with not checking COLORTERM under s=
creen
    >> >> instead.
    >>=20
    Eli> That's a separate issue, from where I stand.  Users can unset
    Eli> COLORTERM, but their true terminal type will still be "hidden" beh=
ind
    Eli> the "screen." prefix, won't it?  The terminal type is about more t=
han
    Eli> just the colors.  Or does terminfo know about this "screen." busin=
ess?
    >>=20
    >> I have both a 'screen.xterm-256color' and a 'xterm-256color' terminfo
    >> file. I don=CA=BCt think terminfo does any prefix stripping, as ther=
e=CA=BCs a
    >> whole bunch of screen.$TERM files, which would be unnecessary if
    >> stripping were happening.

    Eli> Are the screen.$TERM files different from the corresponding $TERM
    Eli> ones?  If so, what are the differences?

$ infocmp screen.xterm-256color xterm-256color

comparing screen.xterm-256color to xterm-256color.
    comparing booleans.
	bce: F:T.
	bw: T:F.
	ccc: F:T.
    comparing numbers.
    comparing strings.
	initc: NULL, '\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}=
%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\'.
	invis: NULL, '\E[8m'.
	kIC: NULL, '\E[2;2~'.
	kNXT: NULL, '\E[6;2~'.
	kPRV: NULL, '\E[5;2~'.
	kend: '\E[4~', '\EOF'.
	khome: '\E[1~', '\EOH'.
	kmous: '\E[M', '\E[<'.
	oc: NULL, '\E]104\007'.
	ritm: NULL, '\E[23m'.
	rs1: '\Ec', '\Ec\E]104\007'.
	sgr: '%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t=
;5%;%?%p5%t;2%;m', '%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%=
;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m'.
	sitm: NULL, '\E[3m'.

    Eli> And if screen.$TERM files are available in the terminfo DB, then w=
hy
    Eli> did you suggest to do something in init_tty in the first place?

Becasue the behaviour is different (all under 'screen' in gnome-terminal):

1.
COLORTERM=3Dtruecolor TERM=3Dscreen.xterm-256color src/emacs -nw -Q etc/NEWS

(display-color-cells) =3D> 16777216

but the display looks black & white, and `list-colors-display' looks
really off.

2.
COLORTERM=3Dtruecolor TERM=3Dxterm-256color src/emacs -nw -Q etc/NEWS

(display-color-cells) =3D> 16777216

The display looks more colourful, but `list-colors-display' is still
off.

3.
COLORTERM=3D TERM=3Dscreen.xterm-256color src/emacs -nw -Q etc/NEWS

(display-color-cells) =3D> 256
The display is now colourful, and `list-colors-display' has 256
entries, but:

4.
COLORTERM=3D TERM=3Dxterm-256color src/emacs -nw -Q etc/NEWS

This is like [3], but the colours are different.

[2] is a definite improvement over [1], but it would be nice if we
could get to [3] or [4] (my gnome-terminal may be too old for proper
truecolor support, it=CA=BCs 3.83.3 with VTE 0.62.3)

    Eli> Also, what about the lisp/term/ files -- are we loading the right
    Eli> files when TERM -s set to screen.SOMETHING? should we?

We=CA=BCre running term/screen.el (which then runs xterm.el)
=20
    >> Perhaps the best thing to do is put an entry in etc/PROBLEMS?

    Eli> About what?  If screen.FOO files are available, then everything sh=
ould
    Eli> already work correctly OOTB, no?  Or what am I missing here?

If everything worked OOTB, then yes, but our handling of COLORTERM is
still problematic. If we could delay the 24bit colour support decision
until we=CA=BCre in lisp/term I think that would help.

Robert
--=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 20 Mar 2023 12:17:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 20 08:17:03 2023
Received: from localhost ([127.0.0.1]:53873 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1peERi-0006iL-NN
	for submit <at> debbugs.gnu.org; Mon, 20 Mar 2023 08:17:02 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53880)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1peERh-0006ho-6T
 for 62237 <at> debbugs.gnu.org; Mon, 20 Mar 2023 08:17:01 -0400
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 <eliz@HIDDEN>)
 id 1peERb-0007Np-VR; Mon, 20 Mar 2023 08:16:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=0zMlI5Iqb7Vrae64UdXg9Ag5GoOOciZwny9G4X1Dgm0=; b=gEsRLnzP/u8pA3x2yUfh
 G3hRwLNfo240XYri/dYt5xmxapGeb9yDr6v7dxfBe5e3RDMQEKAHDrTdZIh9jOJfAoDG8p+2YgmTX
 Guh+EUIZtLhgjejya6wX6UxHiN0doJDAf95fVFzBa5yyg0k6GRc2B75lTDJ4UOY7fLDONMP4rC5i+
 uHLYSM59W3Sn51PH94E3bi0/iBsJB5C0Q5/4U3mTlAK8kGvxSd6wC3u0DB/A1NPtFTd+mg/VSg8CT
 w5neCOZuXwUHrYmOQCYKVGhpS2cPCeFa8t2Aqt9jUYO3MxghdxofiYTp/RxhNIZ/s5BpxWZfemfL2
 Dge3wJBSsJABBQ==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1peERb-00063l-FO; Mon, 20 Mar 2023 08:16:55 -0400
Date: Mon, 20 Mar 2023 14:17:03 +0200
Message-Id: <83jzzb8vnk.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sebastian Tennant <sdt@HIDDEN>
In-Reply-To: <87v8iv94vq.fsf@HIDDEN> (message from Sebastian Tennant on
 Mon, 20 Mar 2023 08:57:45 +0000)
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
 <871qlms7h3.fsf@HIDDEN> <83r0tmbb11.fsf@HIDDEN>
 <87sfe2qo5u.fsf@HIDDEN> <83lejub31r.fsf@HIDDEN>
 <87o7onrf8o.fsf@HIDDEN> <87v8iv94vq.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62237
Cc: rpluim@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Sebastian Tennant <sdt@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  62237 <at> debbugs.gnu.org
> Date: Mon, 20 Mar 2023 08:57:45 +0000
> 
> > I have both a 'screen.xterm-256color' and a 'xterm-256color'
> > terminfo file. I donʼt think terminfo does any prefix stripping, as
> > thereʼs a whole bunch of screen.$TERM files, which would be
> > unnecessary if stripping were happening.
> 
> FWIW, I agree that stripping the 'screen.' prefix isn’t the correct
> thing to do.  (Let's not forget that the issue seems to have bitten
> only one person in well over a year).

Why did this bite you?  Don't you have those screen.FOO files?  If
not, why not?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 20 Mar 2023 12:15:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 20 08:15:35 2023
Received: from localhost ([127.0.0.1]:53868 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1peEQJ-0006fl-68
	for submit <at> debbugs.gnu.org; Mon, 20 Mar 2023 08:15:35 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34502)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1peEQH-0006fW-Id
 for 62237 <at> debbugs.gnu.org; Mon, 20 Mar 2023 08:15:34 -0400
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 <eliz@HIDDEN>)
 id 1peEQB-0006zN-SH; Mon, 20 Mar 2023 08:15:27 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=5uiV8G4paFPydwnq3FK2YcqyanSkaJtq9RA0koJJ0v8=; b=UcFQoxX2Fih4LC8htIE5
 jBInffiP0/du7Z3dozcf1Z1OaIcDYpzUjg10zr5hgPo/rFUEp9n/iFKV9K34aD7FJDLjLCNTOmuY/
 iQtskojvbzU3MAby4lnEAudk12KHG2BjVCO8UphnK0LJHZBxTfGvOch1EOrjSOES5t8FQOIs3iCWM
 Co2x/4ZDaYWPJ7dMK2RH9y59oU0VQghXJkAXNTpxS8NYPSfyCd5Cx8o3vo7iU/Gfbx4PF64ngNvm0
 6nK9gyRil9/Y1mLfP+CNIt9ztUfzfyF92RTtWjmqBlVZUuHXF5f5tzyJafxJWjLyvValxSj4DpXHi
 Meon0AFl3dfKgA==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1peEQA-0005uZ-Vc; Mon, 20 Mar 2023 08:15:27 -0400
Date: Mon, 20 Mar 2023 14:15:35 +0200
Message-Id: <83lejr8vq0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Robert Pluim <rpluim@HIDDEN>
In-Reply-To: <87o7onrf8o.fsf@HIDDEN> (message from Robert Pluim on Mon, 20
 Mar 2023 09:36:39 +0100)
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
 <871qlms7h3.fsf@HIDDEN> <83r0tmbb11.fsf@HIDDEN>
 <87sfe2qo5u.fsf@HIDDEN> <83lejub31r.fsf@HIDDEN> <87o7onrf8o.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62237
Cc: sdt@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: sdt@HIDDEN,  62237 <at> debbugs.gnu.org
> Date: Mon, 20 Mar 2023 09:36:39 +0100
> 
> >>>>> On Sat, 18 Mar 2023 15:29:52 +0200, Eli Zaretskii <eliz@HIDDEN> said:
> 
>     >> From: Robert Pluim <rpluim@HIDDEN>
>     >> Cc: sdt@HIDDEN,  62237 <at> debbugs.gnu.org
>     >> Date: Sat, 18 Mar 2023 12:44:45 +0100
>     >> 
>     >> >>>>> On Sat, 18 Mar 2023 12:37:30 +0200, Eli Zaretskii <eliz@HIDDEN> said:
>     >> 
>     Eli> Then I guess we should install your proposed fix in init_tty.
>     >> 
>     >> In emacs-29? That seems a bit radical. Patch below in any case
> 
>     Eli> Yes, I think in emacs-29.  Why "radical"?
> 
> Changing the interpretation of the userʼs TERM seems pretty radical to
> me, even if it will tend to improve usersʼ experience.

If screen.FOO is not recognizable while FOO is, then we cannot
possibly break anything by this change, however radical.  (But it
sounds like I misunderstood what is going on here, see below.)

>     >> I guess we could do something with not checking COLORTERM under screen
>     >> instead.
> 
>     Eli> That's a separate issue, from where I stand.  Users can unset
>     Eli> COLORTERM, but their true terminal type will still be "hidden" behind
>     Eli> the "screen." prefix, won't it?  The terminal type is about more than
>     Eli> just the colors.  Or does terminfo know about this "screen." business?
> 
> I have both a 'screen.xterm-256color' and a 'xterm-256color' terminfo
> file. I donʼt think terminfo does any prefix stripping, as thereʼs a
> whole bunch of screen.$TERM files, which would be unnecessary if
> stripping were happening.

Are the screen.$TERM files different from the corresponding $TERM
ones?  If so, what are the differences?

And if screen.$TERM files are available in the terminfo DB, then why
did you suggest to do something in init_tty in the first place?

Also, what about the lisp/term/ files -- are we loading the right
files when TERM -s set to screen.SOMETHING? should we?

> Perhaps the best thing to do is put an entry in etc/PROBLEMS?

About what?  If screen.FOO files are available, then everything should
already work correctly OOTB, no?  Or what am I missing here?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 20 Mar 2023 08:57:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 20 04:57:57 2023
Received: from localhost ([127.0.0.1]:53656 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1peBL2-0002gB-P4
	for submit <at> debbugs.gnu.org; Mon, 20 Mar 2023 04:57:57 -0400
Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:33303)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sebyte+return-path@HIDDEN>) id 1peBL0-0002fy-Qx
 for 62237 <at> debbugs.gnu.org; Mon, 20 Mar 2023 04:57:55 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.west.internal (Postfix) with ESMTP id E41E03200943;
 Mon, 20 Mar 2023 04:57:48 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Mon, 20 Mar 2023 04:57:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebyte.me; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm2; t=
 1679302668; x=1679389068; bh=usS4ci7+GMi3VJ7wt1ao9cSXnRyWLGvQOGi
 7Q1JXCl0=; b=OvZMbqluBXzZ+pL+DyS7+ac/lE/kWlY2mQ284dTvnP686JARgo3
 o4l/aRGFxFSiecQVBCla4IXuRovpb8Dtq/6XxZ1LDiLI8jgnNgOzE1ncWGhqrj87
 XxFc20FnXlcCM2PmuFYVUrm+VeXOX6eCWzngXIlOzzdAfnvU3BsIRhc9Lc9HNie/
 +VmOvtTIlnG80JNpaqb9TwpMzvDzH7f8XArfH6TWO3ugYO1NLkPLGm2Na9/bwaeX
 DaCGcCzyGLokVciWlig7bLDFSLAi3KPdJaobVSXEec8wgICfwZ6uyKGtms70tQZi
 XUZeUtqDmNl0vO1bVg4azSlnEC1ydYUj/Ig==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1679302668; x=1679389068; bh=usS4ci7+GMi3VJ7wt1ao9cSXnRyWLGvQOGi
 7Q1JXCl0=; b=YPXgyvXZu4nbW/2kpkRctfc2yEaYFXgJCf8H66LSSOEeheNNrUP
 mZSaryR+XErb68HHHsjuvhP5wEAwv6OBOxx8k+bgiR4VPuvxwlsgK6k+Pou3xfjv
 i9xD3x4Yyj+X9sz4iF0vfstpizu9GANfw6mbEW6k5V0PAeRQ6y+2MnHQoTHkxBal
 XBzND5ir/owf6i56N6lrvidtVOXPeq8OAGzas9ZFeXqbM+YU7XBZL/Qr88j8rhWO
 06ZVwf/3mKKLZzS1P8sg7TOyBVTUX4RgwWmppzRoe1hEeh4ybtpklDRh0Ywv1s4x
 wzYguEpCJmLtB6pSzkY2lv40iPEC0a7NVsg==
X-ME-Sender: <xms:DCAYZL5Nxqz7heBejuPCqajt-zZBMkG0vqMGlJTaZnVpx4mFBJJZFg>
 <xme:DCAYZA7qZXEJTIzwedutSaj9C1hd8qpKzeY4DItP4NhbhT40TjguKAduzS0upIn0B
 Te1SYH0f-kwMZDIlg>
X-ME-Received: <xmr:DCAYZCeU9biw3fs_9_ZfiuCvCmgK7V9nrzhlzcbGEooW2K3J2m-vql6PPcUiehTMk3n1mvY>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefjedguddvlecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvfevufgjfhffkfgfgggtgfesthhqredttderjeenucfhrhhomhepufgv
 sggrshhtihgrnhcuvfgvnhhnrghnthcuoehsughtsehsvggshihtvgdrmhgvqeenucggtf
 frrghtthgvrhhnpedvgfettdeuueeufeekvdejhedvteeggefhheejgffhheeigeetfeeg
 gfelkeeghfenucffohhmrghinhepshgtrhgvvghnrdgsuhhsihhnvghsshenucevlhhush
 htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvggshihtvgdorhgv
 thhurhhnqdhprghthhesfhgrshhtmhgrihhlrdgtohhm
X-ME-Proxy: <xmx:DCAYZMKKgg467v2wY0nLfJ4RE_OBJkjwU8UQjOK5s2IT8JhbGN_k0Q>
 <xmx:DCAYZPIkW9kLXkZGO1AE8Eg87wqt_nNsOPOlLoFdHj9Zl6shRuSvRw>
 <xmx:DCAYZFzD_trIV4Ygr2e_CJBXmDTnG6x15PEx1L3r7wHIhL9koXc_NQ>
 <xmx:DCAYZFhsY5onanA_-ncQICNPiNGAxrIF9SWEXc4DX8ASdqbCtC1gNg>
Feedback-ID: i9e78401f:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 20 Mar 2023 04:57:48 -0400 (EDT)
Received: from sebyte by balor with local (Exim 4.94.2)
 (envelope-from <sebyte@HIDDEN>)
 id 1peBKs-002LP0-0M; Mon, 20 Mar 2023 08:57:46 +0000
From: Sebastian Tennant <sdt@HIDDEN>
To: Robert Pluim <rpluim@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
In-Reply-To: <87o7onrf8o.fsf@HIDDEN> (Robert Pluim's message of "Mon, 20
 Mar 2023 09:36:39 +0100")
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
 <871qlms7h3.fsf@HIDDEN> <83r0tmbb11.fsf@HIDDEN>
 <87sfe2qo5u.fsf@HIDDEN> <83lejub31r.fsf@HIDDEN>
 <87o7onrf8o.fsf@HIDDEN>
Date: Mon, 20 Mar 2023 08:57:45 +0000
Message-ID: <87v8iv94vq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 62237
Cc: Eli Zaretskii <eliz@HIDDEN>, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

Quoth Robert Pluim <rpluim@HIDDEN>
on Mon, 20 Mar 2023 09:36:39 +0100:
>> [=E2=80=A6]
>> Yes, I think in emacs-29.  Why "radical"?
>
> Changing the interpretation of the user=CA=BCs TERM seems pretty radical
> to me, even if it will tend to improve users=CA=BC experience.
>
>>> I guess we could do something with not checking COLORTERM under screen
>>> instead.
>
>> That's a separate issue, from where I stand.  Users can unset
>> COLORTERM, but their true terminal type will still be "hidden"
>> behind the "screen." prefix, won't it?  The terminal type is about
>> more than just the colors.  Or does terminfo know about this
>> "screen." business?
>
> I have both a 'screen.xterm-256color' and a 'xterm-256color'
> terminfo file. I don=CA=BCt think terminfo does any prefix stripping, as
> there=CA=BCs a whole bunch of screen.$TERM files, which would be
> unnecessary if stripping were happening.

FWIW, I agree that stripping the 'screen.' prefix isn=E2=80=99t the correct
thing to do.  (Let's not forget that the issue seems to have bitten
only one person in well over a year).

> Perhaps the best thing to do is put an entry in etc/PROBLEMS?

How about something like this:

 Emacs >=3D 28.1 respects the value of environment variable COLORTERM
 and if it is set to 'truecolor', expects the terminal to support
 24-bit true colour.

 GNOME Terminal supports true colour and, unnecessarily, sets
 COLORTERM=3Dtruecolor to make this clear.

 GNU Screen 4.X does =CC=B2n=CC=B2o=CC=B2t support true colour.  If you sta=
rt Emacs at
 Screen start time (via an entry in your .screenrc), Emacs will
 inherit the environment and, because of COLORTERM=3Dtruecolor, assume
 the terminal, i.e. the screen, supports true colour.  This will
 result in broken colours in Emacs.

 The simplest solution is to unset COLORTERM in the environment before
 launching screen.

Or words to that effect.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 20 Mar 2023 08:36:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 20 04:36:55 2023
Received: from localhost ([127.0.0.1]:53633 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1peB0h-00027F-9t
	for submit <at> debbugs.gnu.org; Mon, 20 Mar 2023 04:36:55 -0400
Received: from mail-wr1-f42.google.com ([209.85.221.42]:46973)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1peB0a-00026v-1Q
 for 62237 <at> debbugs.gnu.org; Mon, 20 Mar 2023 04:36:54 -0400
Received: by mail-wr1-f42.google.com with SMTP id r29so9463565wra.13
 for <62237 <at> debbugs.gnu.org>; Mon, 20 Mar 2023 01:36:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20210112; t=1679301401;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=9lb9F/Eia38zDvfDa0v8n4a24dOGPgjpveZFL1xW0Ao=;
 b=CCM96ET6LkUZg9LAPyNVmHVj3gsovSs9MKc7kdbyNF3TqApBKToWkJlCqgZ3yaHOuH
 rLpKzOKBlEL1XPDocivxDBNdj3yxKouA3qPrRM2K/SbJc6DbVtedhfo+xsfK5Q6k5CBA
 H1vDp8ML+XQGSmkh/nZzY4dpFc9S6laIGNKWQZqi4YsLonLJAc0uYjUbKuTZLSA5JOg5
 D2vD0P/SF/Iv8ry9OK527XacZ9uTV5tvEYwF5CnCFXeBgHVrZPVNPhnci33PdlwlBmZT
 z9qSDMbml98trfUIpfj3CBp+6Lloa5Mn+bOwVeX07U9xxozguC20YwFM2i3IM3+CBUfB
 j/gQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1679301401;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=9lb9F/Eia38zDvfDa0v8n4a24dOGPgjpveZFL1xW0Ao=;
 b=aPUxsyC1PyDzJtIieFxu0aSN+rKphu3z15yaVTVCZpHAI48jgeUEj7/rnXzrmZF9M9
 XSnMj28q6LgPvJSMP1+DQy14Udt0llAV4QIkyKv5kS3ZyWkdIZbelMbLxNpZHo/+7Awd
 q8vSB5bImkIKQAg9miXe2XPbUpVStTe0wJ2Ic9g7W3N3tgGpuSx0NfXt00iSl/JFeF4I
 iKHSIPLB8OBoWSrtiyazagnzlOcS+vOlk8bOrewdS3u6hdMliJdoVu/+h+mHUr9aJ2DU
 kJ8bfbQRw7slilYFF+7AXFX7N5nJbFzPMoK8zU6PUBklnmrVhRMMBx9dEsY6ZDb+uTUC
 GKFg==
X-Gm-Message-State: AO0yUKVvBO+p+gTsjEGocAhUp7EOVtHaBRG/Pnnt4P0LYmZD6Ly8u0SP
 EGBmqa6UwBYfLKwb//JOlD3pbzMfefY=
X-Google-Smtp-Source: AK7set8l0fQ/3q2rhEfQ5peBbl+t/cUdRnt/Fi1t823mo737+d2/Vcy9OOnmAJBemuY2BAawkPaXzg==
X-Received: by 2002:adf:f842:0:b0:2ce:a95e:8c77 with SMTP id
 d2-20020adff842000000b002cea95e8c77mr12499751wrq.34.1679301401403; 
 Mon, 20 Mar 2023 01:36:41 -0700 (PDT)
Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id
 k5-20020adfe8c5000000b002d748d46565sm1530880wrn.74.2023.03.20.01.36.40
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 20 Mar 2023 01:36:40 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
In-Reply-To: <83lejub31r.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 18 Mar
 2023 15:29:52 +0200")
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
 <871qlms7h3.fsf@HIDDEN> <83r0tmbb11.fsf@HIDDEN>
 <87sfe2qo5u.fsf@HIDDEN> <83lejub31r.fsf@HIDDEN>
Date: Mon, 20 Mar 2023 09:36:39 +0100
Message-ID: <87o7onrf8o.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62237
Cc: sdt@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Sat, 18 Mar 2023 15:29:52 +0200, Eli Zaretskii <eliz@HIDDEN> said:

    >> From: Robert Pluim <rpluim@HIDDEN>
    >> Cc: sdt@HIDDEN,  62237 <at> debbugs.gnu.org
    >> Date: Sat, 18 Mar 2023 12:44:45 +0100
    >>=20
    >> >>>>> On Sat, 18 Mar 2023 12:37:30 +0200, Eli Zaretskii <eliz@HIDDEN=
g> said:
    >>=20
    Eli> Then I guess we should install your proposed fix in init_tty.
    >>=20
    >> In emacs-29? That seems a bit radical. Patch below in any case

    Eli> Yes, I think in emacs-29.  Why "radical"?

Changing the interpretation of the user=CA=BCs TERM seems pretty radical to
me, even if it will tend to improve users=CA=BC experience.

    >> I guess we could do something with not checking COLORTERM under scre=
en
    >> instead.

    Eli> That's a separate issue, from where I stand.  Users can unset
    Eli> COLORTERM, but their true terminal type will still be "hidden" beh=
ind
    Eli> the "screen." prefix, won't it?  The terminal type is about more t=
han
    Eli> just the colors.  Or does terminfo know about this "screen." busin=
ess?

I have both a 'screen.xterm-256color' and a 'xterm-256color' terminfo
file. I don=CA=BCt think terminfo does any prefix stripping, as there=CA=BC=
s a
whole bunch of screen.$TERM files, which would be unnecessary if
stripping were happening.

Perhaps the best thing to do is put an entry in etc/PROBLEMS?

Robert
--=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 18 Mar 2023 18:35:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 18 14:35:41 2023
Received: from localhost ([127.0.0.1]:49055 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdbP3-0003hW-39
	for submit <at> debbugs.gnu.org; Sat, 18 Mar 2023 14:35:41 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:57135)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sebyte+return-path@HIDDEN>) id 1pdbP0-0003hJ-If
 for 62237 <at> debbugs.gnu.org; Sat, 18 Mar 2023 14:35:39 -0400
Received: from compute6.internal (compute6.nyi.internal [10.202.2.47])
 by mailout.nyi.internal (Postfix) with ESMTP id 46EC95C00EF;
 Sat, 18 Mar 2023 14:35:33 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute6.internal (MEProxy); Sat, 18 Mar 2023 14:35:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebyte.me; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm2; t=
 1679164533; x=1679250933; bh=FD4yrl2ZyncFIe1EehJ4kx5SKXu2WgTd4An
 8BoZjiGY=; b=n6AjEuokXPjnd12oRz7BHYdOEkTyMdChKFcPVj6gUGtnhpd2W1p
 Zfj2I6uKmbhDGkHw2GldHQxD9OUppy4fDIZdFtm6OoSgPsk7zN/Nvl1LOXfLVu6Q
 9NNymV68el3JOOlUYp+CHXbkQxvMyuIYqKCg/HXWF6z9LtVUDYcGHlt18UDPL751
 Y/L6A7o9GLgXiDYWRH8qD3Q+EqDTzpjKK1DP0JOLoKUr+U0DXV5Td6O+WldriJZZ
 c2UhMcHzCU+LCpNf57vMHrQ84EqO8mbgXxx3t+1kkK3FqNoJ0ahJdRs342elS7KR
 GEUnq4OU1jmeQ/TqZA68KYLkNHHJEIuIZ0Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1679164533; x=1679250933; bh=FD4yrl2ZyncFIe1EehJ4kx5SKXu2WgTd4An
 8BoZjiGY=; b=iPOV28unhAjHvWUu7257bDi/And0bdnt/zJ43rqRceRBRGXv9bV
 IVYMJeSUMqwHF+UNbJZTlZGJm7F4ltlyFtgMrmB/uejxmf6uXyrHgErK51Xa3A1D
 KcXiKRiJYTu7cSW1PT9ozdrJrLMUxiPUl79GI8OHWmSI4LdMoBS8LpquJWav8xcD
 EXKyxaWRlBrcnBEHQHBtSNwSDl0P4osVcIbqood2x7uCMGGHdGRRs7E6F7FlsPIt
 dVOYo30eaGygasmyQOZ807DWeM5C2NxY6MfVz5HbWrEUjtTdIkGtgvkfCZKWI8bZ
 AbEc+P+Nm3J2K8ad2Io7RYo7eCQN0NZM6Mg==
X-ME-Sender: <xms:dAQWZA9ohwWD5iS400TI_r-RhPRamiNvuRMjFjkB-yA3lOEN-9-i6g>
 <xme:dAQWZIvk7jk2YZGcy1vyO_EirlYEuRed9uPTKmnWvKE9Ac8TtE3ukCbSHJDlNq5LU
 bCsqMr1FTm-YKZLvw>
X-ME-Received: <xmr:dAQWZGCJkH3O8ibBr-xhBrBUOGbhT8g4jQFJqJsdltcNjMG7j9TxURqaKActHMCgL2-jurg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefgedguddufecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvfevufgjfhgffffkgggtgfesthhqredttderjeenucfhrhhomhepufgv
 sggrshhtihgrnhcuvfgvnhhnrghnthcuoehsughtsehsvggshihtvgdrmhgvqeenucggtf
 frrghtthgvrhhnpedukeefvefghfffjeduhfeifeeludehudekteejveefteehgefhgfeu
 hfdtveefveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh
 hmpehsvggshihtvgdorhgvthhurhhnqdhprghthhesfhgrshhtmhgrihhlrdgtohhm
X-ME-Proxy: <xmx:dQQWZAcqWnuvHnVDqbnQiNf-_Ost0g1VZPTzlwnclg27LwaUhaNFYA>
 <xmx:dQQWZFPz3ZMyzSC5pqwMqX8rUb_seoMTyApNfxS14aBF58CYzRjrQw>
 <xmx:dQQWZKnIhym5ZOBJ1Oe7j629tog5h_aTHIdgbCZI0sl7m5B91eYJ3Q>
 <xmx:dQQWZHVyIZjf1OM0KQotv0cJn_BnoCApFbmuE2-DPx3XzyC29Pktng>
Feedback-ID: i9e78401f:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 18 Mar 2023 14:35:32 -0400 (EDT)
Received: from sebyte by balor with local (Exim 4.94.2)
 (envelope-from <sebyte@HIDDEN>)
 id 1pdbOt-0021A7-DC; Sat, 18 Mar 2023 18:35:31 +0000
From: Sebastian Tennant <sdt@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
In-Reply-To: <83ileyay8m.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 18 Mar
 2023 17:13:45 +0200")
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
 <87leju4acd.fsf@HIDDEN> <87wn3eqog7.fsf@HIDDEN>
 <87edpm3xy6.fsf@HIDDEN> <83ileyay8m.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)
Date: Sat, 18 Mar 2023 18:35:31 +0000
Message-ID: <87zg893o24.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 62237
Cc: 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

Quoth Eli Zaretskii <eliz@HIDDEN>
on Sat, 18 Mar 2023 17:13:45 +0200:
> [=E2=80=A6] Or does GNOME itself support true color?

GNOME Terminal/VTE does support true color, but why continue to employ
"a long-obsolete slang-only variable used to work around broken
termcap/terminfo entries"?

Another wrinkle in all this is the fact that I start Emacs at screen
start time (rather than a shell) via an entry in my .screenrc.  This
means the environment is effectively exported and explains why the
value of COLORTERM is picked up by Emacs.  If I allowed screen to fire
up a shell and then started Emacs from that shell, this problem would
never have reared its ugly head!




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 18 Mar 2023 17:56:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 18 13:56:41 2023
Received: from localhost ([127.0.0.1]:49026 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdanJ-0002i2-2h
	for submit <at> debbugs.gnu.org; Sat, 18 Mar 2023 13:56:41 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:39391)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sebyte+return-path@HIDDEN>) id 1pdanH-0002hn-Ov
 for 62237 <at> debbugs.gnu.org; Sat, 18 Mar 2023 13:56:40 -0400
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.nyi.internal (Postfix) with ESMTP id AF8135C0158;
 Sat, 18 Mar 2023 13:56:34 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute3.internal (MEProxy); Sat, 18 Mar 2023 13:56:34 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebyte.me; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm2; t=
 1679162194; x=1679248594; bh=ZEudp5GcBNyzTz2318qhl5x33mWSFQe6LgR
 1D0TakqQ=; b=XUEpD1CuvTwhNRR1azJH+22qD0zgGPvR25lO6KfR6epuDF+NySY
 CsI6YvpUFQ8dgHfNDQaAOsDzCILzbQXz00ljOCSzwpuq/Mo6rT8je9EKHnkZq+Ni
 qQlOhFxk4g2jyFQ1RWUuTTuwhbN5yv4Tj2X45L2EIu3KtYudrTglswzEnfCPDKhr
 5ujCwXO3f+iax07GpcyIC8rI5MAw9lz2ttNOPqmjdYgeAbbn5K02rds8s+OhVCJW
 CW+xmBdxmMBNQhv6LjOHyTSSHkW7XrHPEwm/bPOTyezGRmV1zV894H8LbdwSpX1M
 f6tBE8F8U57fhSc5MQd0EFET7EPTJjjdDFQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1679162194; x=1679248594; bh=ZEudp5GcBNyzTz2318qhl5x33mWSFQe6LgR
 1D0TakqQ=; b=m7AaVuS7c+5kfKVDVqsJydgoryzsdmZ/XqbaatfCI+WBH71YU59
 pgIVqIDPXqfAHPcdgGX7gJnYXBIzg+NsTkujalg0tX/3KBJFykjo8KFOxdzYcUFX
 mRhsprILvD0cjbihIzvpByQqeU1tWT1elDc0jqHgqZLII0eoi80fZsK60TKRUz31
 u7J1q967MbdCSLJ77U3Fou7s5xAaLLzLmzFFj8Bke4VADVz6phW8fp70iHD1c0jV
 qJFNTcKmLZcR3tbAR8FTDZB2vWuWlhakE3vEf3ChDIbMaTxjzVwhfqKgfWJIJbwa
 iOvLwYotj6A3YtkSsUG+0Oib9E8nLrd4luQ==
X-ME-Sender: <xms:UvsVZD_AGcw-hUH2kh2zoW5LNbgi2vGxIJGr0gIwFE7_uardV3xQuQ>
 <xme:UvsVZPuQuS3bAsfLsiZ4bYAEvhVEUcWH51Z7weFerktt1og3kD8SyJriXqruFvbMQ
 w0XRpXkCYzlv0pTTA>
X-ME-Received: <xmr:UvsVZBCVCHlBukfsQz3GgGJCp0i07utK6lSI4-M4lPgEt6AWFHlJXFAXb_eFg_3QKqqyJQM>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefgedguddtgecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvfevufhfffgjkfgfgggtgfesthhqredttderjeenucfhrhhomhepufgv
 sggrshhtihgrnhcuvfgvnhhnrghnthcuoehsughtsehsvggshihtvgdrmhgvqeenucggtf
 frrghtthgvrhhnpeetteegueehveeffeevlefgleejuefgveegvefhfeetvdeifefhtddv
 ieefgfdvieenucffohhmrghinhepuggvsghirghnrdhorhhgpdgrrhgthhhlihhnuhigrd
 horhhgpdhgnhhomhgvrdhorhhgpdhsphgrfihnrdgttgdpuggrthhtuggsrdhinhhfohen
 ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvggshi
 htvgdorhgvthhurhhnqdhprghthhesfhgrshhtmhgrihhlrdgtohhm
X-ME-Proxy: <xmx:UvsVZPdDN84__6OUAGEYPU6pkSxxW3z4OfwX0TTqDti-bPpSiBKa1Q>
 <xmx:UvsVZIOej4onAvocy5_imqJrMcv-sFPZ8tr27dJVEx7-M6awnQpU9A>
 <xmx:UvsVZBnMOkP_Gfd4rr6wD3blLtyawjxAUZioM7jd--vU9Ef1TKDRbg>
 <xmx:UvsVZC03YD_e8Ypa-IBZqlZMppR6s6ggso42qiGOFDWUfYl-3hGjRA>
Feedback-ID: i9e78401f:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 18 Mar 2023 13:56:34 -0400 (EDT)
Received: from sebyte by balor with local (Exim 4.94.2)
 (envelope-from <sebyte@HIDDEN>)
 id 1pdanB-0020zx-05; Sat, 18 Mar 2023 17:56:33 +0000
From: Sebastian Tennant <sdt@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
 <87leju4acd.fsf@HIDDEN> <87wn3eqog7.fsf@HIDDEN>
 <87edpm3xy6.fsf@HIDDEN> <83ileyay8m.fsf@HIDDEN>
Date: Sat, 18 Mar 2023 17:56:32 +0000
In-Reply-To: <83ileyay8m.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 18 Mar
 2023 17:13:45 +0200")
Message-ID: <875yay3pv3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 62237
Cc: rpluim@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

Quoth Eli Zaretskii <eliz@HIDDEN>
on Sat, 18 Mar 2023 17:13:45 +0200:
>> From: Sebastian Tennant <sdt@HIDDEN>
>> Cc: Eli Zaretskii <eliz@HIDDEN>,  62237 <at> debbugs.gnu.org
>> Date: Sat, 18 Mar 2023 15:01:53 +0000
>>
>> [=E2=80=A6]
>>
>> According to:
>>
>>  https://packages.debian.org/search?keywords=3Dscreen
>>
>> Debian bookworm (the next stable release) will ship screen version
>> 4.9.0.  I've downloaded the deb and grepped the manpage and the
>> string "truecolor" is nowhere to be found so it looks as if screen
>> shipped by Debian will lack support for truecolor for some years to
>> come.
>
> According to this:
>
>   https://bbs.archlinux.org/viewtopic.php?id=3D249670
>
> true color support in 'screen' will be released in version 5, and the
> 4.x branch of 'screen' doesn't support it.  This is consistent with
> the fact that you built 'screen' from their mast branch, and it
> announces itself as version 4.99, i.e. the development version of
> v5.x.  I guess an entry in etc/PROBLEMS about this is in order.
>
> What is still a mystery to me is why does GNOME Terminal set
> COLORTERM=3Dtruecolor in the environment.  Does it assume that 'screen'
> will not be used or something?  Or does GNOME itself support true
> color?

Debian bullseye (stable) ships GNOME Terminal version 3.38.3,
tagged/released 4th Feb 2021:

 https://gitlab.gnome.org/GNOME/gnome-terminal/-/commits/3.38.3

Yet, this commit, made 26th April 2014:

 https://gitlab.gnome.org/GNOME/gnome-terminal/-/commits/1d5c1b6ca6373c1301=
494edbc9e43c3e6a9c9aaf/

reads:

 screen: Stop setting COLORTERM env var
 [=E2=80=A6]
 COLORTERM is a long-obsolete slang-only variable used to work around
 broken termcap/terminfo entries.

Hmm...


Turns out GNOME Terminal uses VTE (Virtual TErminal):

 https://gitlab.gnome.org/GNOME/vte

and COLORTERM is set to =E2=80=98truecolor=E2=80=99 in function merge_envir=
on, on line
261 of file src/spawn.cc:

 https://gitlab.gnome.org/GNOME/vte/-/blob/master/src/spawn.cc

As to why, I've written to Christian Persch and I shall update this
bug report as soon as I receive a response.


--=20
Dorothy Annan Trevor Tennant database - DATTdb
http://dattdb.info




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 18 Mar 2023 15:13:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 18 11:13:50 2023
Received: from localhost ([127.0.0.1]:48885 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdYFi-0006mn-4l
	for submit <at> debbugs.gnu.org; Sat, 18 Mar 2023 11:13:50 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45670)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pdYFf-0006mX-TS
 for 62237 <at> debbugs.gnu.org; Sat, 18 Mar 2023 11:13:48 -0400
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 <eliz@HIDDEN>)
 id 1pdYFa-0005Ua-6M; Sat, 18 Mar 2023 11:13:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=dG1C51braIYyZUVe0S4x96j2imLASd+CmBdaSj5tMC0=; b=XMVEA3+QvJj4ww/xpUaD
 aIUoCUVvtDIPgYbRlB1stMMZrK2MDbqO2o1ts6+UvrSMVUMFQxppENqgYr4qHLq+YF170hQCtzDmi
 FMAbqnSvHwfvHzYblVvGudO9k55RpjW+HC491TpF5PI3Qb5A0fTO0B7xpRsoN+BfNtKwBSSxnVYVW
 blFJESwdxvfMXkGsojtMH75sFJA05Dr7wgjxOxAleujEO3apKJqj0SGZBJt6+vuQRITXCl4x1RIpK
 nEesamt14gvEouhwXij1DVMy5dfiPR7HORlnBq/p5sl6kUmkXBxYHC1iS4hZaahj87n+ekr8ca2ee
 whdxGtnKwm7d1g==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pdYFZ-0006MP-LF; Sat, 18 Mar 2023 11:13:41 -0400
Date: Sat, 18 Mar 2023 17:13:45 +0200
Message-Id: <83ileyay8m.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sebastian Tennant <sdt@HIDDEN>
In-Reply-To: <87edpm3xy6.fsf@HIDDEN> (message from Sebastian Tennant on
 Sat, 18 Mar 2023 15:01:53 +0000)
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
 <87leju4acd.fsf@HIDDEN> <87wn3eqog7.fsf@HIDDEN>
 <87edpm3xy6.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62237
Cc: rpluim@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Sebastian Tennant <sdt@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  62237 <at> debbugs.gnu.org
> Date: Sat, 18 Mar 2023 15:01:53 +0000
> 
> I've now built and installed screen ‘master’ (4.99) and the problem is
> resolved, i.e. provided my .screenrc includes the line ‘truecolor on’,
> colours work fine with COLORTERM set to ‘truecolor’, or not set at
> all.
> 
> Sorry about all this.  Many months ago, I built screen from master and
> ran it to see if it made a difference.  I concluded then that it
> didn't and I think this must have been because I didn't actually
> install the version I built.  This meant that the relevant entries
> under /usr/lib/terminfo/s were not written/updated.
> 
> In any case, we've established one thing for certain, the version of
> screen shipped by Debian bullseye (stable) does not support truecolor.
> Most strange is the fact that, according to dpkg, the version shipped
> is 4.8.0:
> 
>  $ dpkg -l | grep screen
>  ii  screen  4.8.0-6  amd64 terminal multiplexer with VT100/ANSI…
>              ^^^^^
> 
> but screen itself reports:
> 
>  $ screen --version
>  Screen version 4.08.00 (GNU) 05-Feb-20
>                 ^^^^
> 
> which makes no sense at all!
> 
> According to:
> 
>  https://packages.debian.org/search?keywords=screen
> 
> Debian bookworm (the next stable release) will ship screen version
> 4.9.0.  I've downloaded the deb and grepped the manpage and the string
> "truecolor" is nowhere to be found so it looks as if screen shipped by
> Debian will lack support for truecolor for some years to come.

According to this:

  https://bbs.archlinux.org/viewtopic.php?id=249670

true color support in 'screen' will be released in version 5, and the
4.x branch of 'screen' doesn't support it.  This is consistent with
the fact that you built 'screen' from their mast branch, and it
announces itself as version 4.99, i.e. the development version of
v5.x.  I guess an entry in etc/PROBLEMS about this is in order.

What is still a mystery to me is why does GNOME Terminal set
COLORTERM=truecolor in the environment.  Does it assume that 'screen'
will not be used or something?  Or does GNOME itself support true
color?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 18 Mar 2023 15:02:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 18 11:02:02 2023
Received: from localhost ([127.0.0.1]:48875 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdY4I-0006VP-H5
	for submit <at> debbugs.gnu.org; Sat, 18 Mar 2023 11:02:02 -0400
Received: from out3-smtp.messagingengine.com ([66.111.4.27]:39611)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sebyte+return-path@HIDDEN>) id 1pdY4G-0006Up-QZ
 for 62237 <at> debbugs.gnu.org; Sat, 18 Mar 2023 11:02:01 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.nyi.internal (Postfix) with ESMTP id C0FA95C01CA;
 Sat, 18 Mar 2023 11:01:55 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Sat, 18 Mar 2023 11:01:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebyte.me; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm2; t=
 1679151715; x=1679238115; bh=2EAmy/GqMmIFT48322OLP/jVu8tBXosgeAw
 UV/fg5eg=; b=idYM13y/5gpy/uihiBkbw9CRJwQuJctL9Agfc51US/zBJVbFiZm
 RnPJl9vpKxD4pZ6ZT4+EaiCoMXdbQjkP6rRyfQmCYbOxloN90973n81rpK06W2fl
 S0IuWs0eWUbk+OzTQqcmmkPSX/faVQE/B/SFISIBv3NSwTj029A9DU8lepaADjZU
 A6bwfnGq+VHmyLChVnUY+0q3NwFqoySCgVN30Tx5hS1iBP/xlC7dzagAAGRJE4y/
 3fV8n3rCaVGw++U7FRS/4+On9BILjHKG1UGUm4VnI8liHMdyidzBwFtxgBlmFzpZ
 7mDLrN4wW/zxBSajFbZiSaaK5yqvjtpt3Yg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1679151715; x=1679238115; bh=2EAmy/GqMmIFT48322OLP/jVu8tBXosgeAw
 UV/fg5eg=; b=mLfOvRRzUrbN0c26fpf0vFh6UOYwrh8GqJh8qgByMQfxe1jfyHG
 wKLyNlsHaUmKYGu0z/zr5dRjQUv9rkjrAg1XtqHh/rNZAyCljT3vfwP4BDZ/P1CX
 SPOwisN6QJR7ex1p8SmwduABWsIXUYwJKq3si0W2esyIz14dleA+1rIxw7DsDccc
 4+ZKPG/Q8g/IYiVKP9yzMUQZ49U6d218jeI8WlyYgRbBpqNZb+uiLjQYJTzncEXC
 y4pBPkJtpGeYhhIfVPRWEdfPaKSUjsG3UEba1NuLUcMuit1wgsP4GSQKk6LLiXxJ
 4lFBqmHT5zGABXXlbEthFiwR+wHwM8GLA1A==
X-ME-Sender: <xms:Y9IVZBRaBGefquSCrAkusy34yeFtiZr-Iazxc_XE-3OhtqHSnlq7uw>
 <xme:Y9IVZKxuLnDGHivVk6NwW3Vmp3OvrbsRKtGiUTJfuCQtsCpTUZ3mOqCl1_djr3kSh
 GfSGh3OBv8DIrboXw>
X-ME-Received: <xmr:Y9IVZG3_I6F_d1WKHQyAWQTIoU7bgAR3yccX5jSqwwQCPqaKQsef0FOFeR5jFF4OxIT99cc>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefgedgieelucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvvefufhffjgfkfgggtgfgsehtqhertddtreejnecuhfhrohhmpefuvggs
 rghsthhirghnucfvvghnnhgrnhhtuceoshguthesshgvsgihthgvrdhmvgeqnecuggftrf
 grthhtvghrnhepleetleeutdeuvdetveehhfeljeektefhheejudehjeehudejjeduhfeu
 hefgtdfhnecuffhomhgrihhnpeguvggsihgrnhdrohhrghenucevlhhushhtvghrufhiii
 gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvggshihtvgdorhgvthhurhhnqdhp
 rghthhesfhgrshhtmhgrihhlrdgtohhm
X-ME-Proxy: <xmx:Y9IVZJAbLzdRdf1kBH8onHJa_DR1KNrNIkSIhV3ZmobI7wdqBjbGbQ>
 <xmx:Y9IVZKjg1VbPzqwL3SzpVPuSUYsd0Ps5r_9m2bWj2aH2IZm9FFVjLg>
 <xmx:Y9IVZNozrmwH1CdSYWJWg-N9gv-bi9sNIXuDEuJZH_2PTYRCMbZiSw>
 <xmx:Y9IVZOYIWOYYkJxCnTbkMUISKz4BYqrn0Vx5PQmWBAhUwoxeO9k3sg>
Feedback-ID: i9e78401f:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 18 Mar 2023 11:01:55 -0400 (EDT)
Received: from sebyte by balor with local (Exim 4.94.2)
 (envelope-from <sebyte@HIDDEN>)
 id 1pdY49-0020TT-Nd; Sat, 18 Mar 2023 15:01:53 +0000
From: Sebastian Tennant <sdt@HIDDEN>
To: Robert Pluim <rpluim@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
 <87leju4acd.fsf@HIDDEN> <87wn3eqog7.fsf@HIDDEN>
Date: Sat, 18 Mar 2023 15:01:53 +0000
In-Reply-To: <87wn3eqog7.fsf@HIDDEN> (Robert Pluim's message of "Sat, 18
 Mar 2023 12:38:32 +0100")
Message-ID: <87edpm3xy6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 62237
Cc: Eli Zaretskii <eliz@HIDDEN>, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

Quoth Robert Pluim <rpluim@HIDDEN>
on Sat, 18 Mar 2023 12:38:32 +0100:
>> [=E2=80=A6]  If you discard the =E2=80=98screen.=E2=80=99 prefix by expl=
icitly setting TERM
>> in your .screenrc; for example:
>>
>>  term xterm-256color
>>
>> it makes no difference, i.e. colours are still broken (when
>> COLORTERM is set to =E2=80=98truecolour=E2=80=99).
>
> Hmm, I get 24-bit colour in that case. Presumably because screen +
> gnome-terminal supports it.

It seems my version of screen was too old and truecolor is not
supported.

I've now built and installed screen =E2=80=98master=E2=80=99 (4.99) and the=
 problem is
resolved, i.e. provided my .screenrc includes the line =E2=80=98truecolor o=
n=E2=80=99,
colours work fine with COLORTERM set to =E2=80=98truecolor=E2=80=99, or not=
 set at
all.

Sorry about all this.  Many months ago, I built screen from master and
ran it to see if it made a difference.  I concluded then that it
didn't and I think this must have been because I didn't actually
install the version I built.  This meant that the relevant entries
under /usr/lib/terminfo/s were not written/updated.

In any case, we've established one thing for certain, the version of
screen shipped by Debian bullseye (stable) does not support truecolor.
Most strange is the fact that, according to dpkg, the version shipped
is 4.8.0:

 $ dpkg -l | grep screen
 ii  screen  4.8.0-6  amd64 terminal multiplexer with VT100/ANSI=E2=80=A6
             ^^^^^

but screen itself reports:

 $ screen --version
 Screen version 4.08.00 (GNU) 05-Feb-20
                ^^^^

which makes no sense at all!

According to:

 https://packages.debian.org/search?keywords=3Dscreen

Debian bookworm (the next stable release) will ship screen version
4.9.0.  I've downloaded the deb and grepped the manpage and the string
"truecolor" is nowhere to be found so it looks as if screen shipped by
Debian will lack support for truecolor for some years to come.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 18 Mar 2023 13:29:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 18 09:29:59 2023
Received: from localhost ([127.0.0.1]:46651 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdWdC-0003PQ-S7
	for submit <at> debbugs.gnu.org; Sat, 18 Mar 2023 09:29:59 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54784)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pdWdA-0003PB-Vq
 for 62237 <at> debbugs.gnu.org; Sat, 18 Mar 2023 09:29:57 -0400
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 <eliz@HIDDEN>)
 id 1pdWd5-0002Sb-Ev; Sat, 18 Mar 2023 09:29:51 -0400
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=kNo+GxdWsAcYCYu5c73gUlGp3KNG9YVI4HB4X0PpL1I=; b=mA4kzUnSw3uc
 SrWC3+Ts+kslwVod79tGLFXUE+tzpzaDTVopxOeCBFXI7lIKW49NENxt7sKJ4YIF5klG3skzfijLT
 v1zluwL0OBgk0Ltdv3B+BRHZaok+4zHOQsacraf/ZsdnP13WF8CSs++2LODHVznZOoV7PkgWcNkK4
 FjZ5Jvo0Dpm+mPZIjFJpu/oJbdL060nlD4Dhmn72WI/5Z8ZkUUEhWGbQLu+srPub1MTSwHsV/23GG
 +pf+AtREdE7gAavSqTOdLu/SybLmb7Xr/MnUHXKsvLvf7FZOOXvbUNE3WFbiFqqKnuT+lYwQP+Ifv
 vya0YoF5Tc7zOVTdcdGdMQ==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pdWd4-0000GQ-Qb; Sat, 18 Mar 2023 09:29:51 -0400
Date: Sat, 18 Mar 2023 15:29:52 +0200
Message-Id: <83lejub31r.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Robert Pluim <rpluim@HIDDEN>
In-Reply-To: <87sfe2qo5u.fsf@HIDDEN> (message from Robert Pluim on Sat, 18
 Mar 2023 12:44:45 +0100)
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
 <871qlms7h3.fsf@HIDDEN> <83r0tmbb11.fsf@HIDDEN>
 <87sfe2qo5u.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62237
Cc: sdt@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: sdt@HIDDEN,  62237 <at> debbugs.gnu.org
> Date: Sat, 18 Mar 2023 12:44:45 +0100
> 
> >>>>> On Sat, 18 Mar 2023 12:37:30 +0200, Eli Zaretskii <eliz@HIDDEN> said:
> 
>     Eli> Then I guess we should install your proposed fix in init_tty.
> 
> In emacs-29? That seems a bit radical. Patch below in any case

Yes, I think in emacs-29.  Why "radical"?

> I guess we could do something with not checking COLORTERM under screen
> instead.

That's a separate issue, from where I stand.  Users can unset
COLORTERM, but their true terminal type will still be "hidden" behind
the "screen." prefix, won't it?  The terminal type is about more than
just the colors.  Or does terminfo know about this "screen." business?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 18 Mar 2023 11:44:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 18 07:44:54 2023
Received: from localhost ([127.0.0.1]:46456 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdUzW-0006h8-EB
	for submit <at> debbugs.gnu.org; Sat, 18 Mar 2023 07:44:54 -0400
Received: from mail-wm1-f45.google.com ([209.85.128.45]:46850)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1pdUzV-0006gw-2t
 for 62237 <at> debbugs.gnu.org; Sat, 18 Mar 2023 07:44:53 -0400
Received: by mail-wm1-f45.google.com with SMTP id
 l15-20020a05600c4f0f00b003ed58a9a15eso4790297wmq.5
 for <62237 <at> debbugs.gnu.org>; Sat, 18 Mar 2023 04:44:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20210112; t=1679139887;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=PzMU962rtBMM0LRGXf9TduTfET5Oz/Nao1LnOY7UCv8=;
 b=cOBAIEXFy0xFPEW1EoSUDP4nR9+QtvNGwNeOS4Glw1QmRRl4vBdOgH/Z151chutj42
 +MCsqbOaXF0ZoDH1tOlGwqdB0JztiIE6g12sTVYlt/Mf2CoxG3bH39/DkJcdZ6tJCIca
 9Z2wLET4VmLBLX3HRcLEs3TAKxEjzCXHkmc0Ew/Au+0cwf/l4OKRK/xzx2O4oHC7RqsF
 N8UBL1toeOEcsPGYxS5w2ewse3xYM0wsLFyk0AO//8eBcdh4AxE//vovcY2bfIy4+UPi
 7qJALOuvuEjSjHC+PbBjcmE8Xb5PXS6vscDxVis0Itg0na6BDiMbdYm6CswKONftSRrw
 oFsQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1679139887;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=PzMU962rtBMM0LRGXf9TduTfET5Oz/Nao1LnOY7UCv8=;
 b=KkcM6bDTuPEY/sUQdfWh4O7iB5zD7SSi7vsIqFUCap9G4ow6CMr3NANvleHnwpJI47
 /Rp67xTDQ6dInNmPf2y2LOkGpk4ImdAauSfDgyYVyfecvghMvu2BpWlcGpgMoUcOdY+4
 hdSrCfKAOcs/GPXsZqhdd6IamUs1EBTnN6BNifY2mppqZLWwvghNBm2t5XdinRIYJu+s
 qBYg2dySBwJEu3a5g+mnX4XyPqyaupWWUomhIVnaFaHddiaqsl2OByxt7UFkKx07J31b
 9glE4lGvwtRdstH+YdZ75A2FQONJscs1PrJWtXm37Wds74oGPuhSgD7svzsS2SYvzQVY
 O+tA==
X-Gm-Message-State: AO0yUKVEwnt61AKleXON/l6RKn+Dnm9KwSv9+05BrBNyqtm+jdpKJYKM
 bb403M6tWCi48j4RO/bxD+d2fv2LM5I=
X-Google-Smtp-Source: AK7set9LxzqIe8w0gtqCBVhoqnp+3g+bgKC4KwPEInspIPryw4wwURaCSyJCczmglDxwIGkjF8OjUg==
X-Received: by 2002:a05:600c:470e:b0:3eb:29fe:734a with SMTP id
 v14-20020a05600c470e00b003eb29fe734amr26940305wmo.39.1679139886816; 
 Sat, 18 Mar 2023 04:44:46 -0700 (PDT)
Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id
 n23-20020a1c7217000000b003eb68bb61c8sm4913917wmc.3.2023.03.18.04.44.46
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 18 Mar 2023 04:44:46 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
In-Reply-To: <83r0tmbb11.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 18 Mar
 2023 12:37:30 +0200")
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
 <871qlms7h3.fsf@HIDDEN> <83r0tmbb11.fsf@HIDDEN>
Date: Sat, 18 Mar 2023 12:44:45 +0100
Message-ID: <87sfe2qo5u.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62237
Cc: sdt@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Sat, 18 Mar 2023 12:37:30 +0200, Eli Zaretskii <eliz@HIDDEN> said:

    Eli> Then I guess we should install your proposed fix in init_tty.

In emacs-29? That seems a bit radical. Patch below in any case

I guess we could do something with not checking COLORTERM under screen
instead.

Robert
-- 

diff --git i/src/dispnew.c w/src/dispnew.c
index 87ec83acdf3..f165c604ae9 100644
--- i/src/dispnew.c
+++ w/src/dispnew.c
@@ -6586,6 +6586,21 @@ init_display_interactive (void)
       exit (1);
     }
 
+  if (!NILP (Vterm_strip_prefixes))
+    {
+      Lisp_Object prefixes = Vterm_strip_prefixes;
+      FOR_EACH_TAIL (prefixes)
+	{
+	  char *c_prefix = SSDATA (XCAR (prefixes));
+	  int len = strlen (c_prefix);
+	  if (strncmp (terminal_type, c_prefix, len) == 0)
+	    {
+	      terminal_type += len;
+	      break;
+	    }
+	}
+    }
+
   {
     struct terminal *t;
     struct frame *f = XFRAME (selected_frame);
@@ -6817,6 +6832,11 @@ syms_of_display (void)
 Possible values are t (below the tool bar), nil (above the tool bar).
 This option affects only builds where the tool bar is not external.  */);
 
+  DEFVAR_LISP ("term-strip-prefixes", Vterm_strip_prefixes,
+	       doc: /* List of prefixes to try to strip from the TERM environment variable.
+This will strip the first matching prefix only.  */);
+  Vterm_strip_prefixes = Fcons (build_string ("screen."), Qnil);
+
   pdumper_do_now_and_after_load (syms_of_display_for_pdumper);
 }
 





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 18 Mar 2023 11:38:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 18 07:38:43 2023
Received: from localhost ([127.0.0.1]:46442 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdUtW-0006X7-T8
	for submit <at> debbugs.gnu.org; Sat, 18 Mar 2023 07:38:43 -0400
Received: from mail-ed1-f45.google.com ([209.85.208.45]:39673)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1pdUtU-0006Wr-Jp
 for 62237 <at> debbugs.gnu.org; Sat, 18 Mar 2023 07:38:41 -0400
Received: by mail-ed1-f45.google.com with SMTP id ek18so29770442edb.6
 for <62237 <at> debbugs.gnu.org>; Sat, 18 Mar 2023 04:38:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20210112; t=1679139514;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=NHeGva4RyEBJ9kpvrkDIlX/v6mBIUiIB1saie+v6VIQ=;
 b=dKM1O5q6ONqgSGDh0mgQza9iHNJX3MNWbe1pf7X8ha3QQXByG071BkDAh7WDpnOIj9
 fU9BPOKFdg/TZ+F8gdoeR2bFLZnxB25+4de/1yNl6Wl5y+JbPJrsv2laEw+yyh0N9csX
 Cd8U4FAw141fTHDbIG4dnq6Ol+5LQd3qW04E3MISrvNI75KOzrw/d6qAfFjupwszyufO
 NPQqEEErhrHbCJe4axB+nNRm/fv13ajNLxM8+8GwRRep77rZS8Kh4F+iqN/1zvmPUodL
 CHtWoNGOfXbgtoMMnNlWtxyYc51o6ASr9k6OD69BKAsXmiVVMB9KQfflqfTdDPP6iE8J
 raFg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1679139514;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=NHeGva4RyEBJ9kpvrkDIlX/v6mBIUiIB1saie+v6VIQ=;
 b=jwDoskS0kfepoQ/DyX3iLzX/g/jMJ2zYQa+uJZjEhHcARlbIhpu86NPfnsovstFBQH
 qAR/gsT3wjI/FVSKAD5mnThBiPfDaBMNpybC8o7kHW80w9oVoKBIZILImUlZ2qvR0ws6
 cPmS+6GhwU42UNmMxeOCzbMFawAqmXHpjfRMfsPOr1OpPkX/Y0UbUyiv6f8YplAa66r2
 jWtHjGwnguRpG6gd7nGAftR4SYpzmL7hfP14+HRD2Xty4cI5Q9fXIZIPj0pTFoqCSy04
 UKzTiihDyTou1msT8lHpYwpYoSCRU5wNjUPt+SVV0pUHsy0RySltxaA2JA6RhpQ/s62e
 Th3A==
X-Gm-Message-State: AO0yUKVNQ6Gmpu0XeKJNmjswCzDrA3Xf3HV2KknkWHgLFcW1Ql5YveOo
 3UKwA8aGiE4IxRw6h7BAZRs64fx6oAc=
X-Google-Smtp-Source: AK7set+Bt41pPVPW7CNG5Yycw2a49Yu2WFbtjUQ4cEmRBwcSVfKNqanOys3I1kTfHlytSqaqs+0x6A==
X-Received: by 2002:a17:906:bc8a:b0:930:7d8f:15a4 with SMTP id
 lv10-20020a170906bc8a00b009307d8f15a4mr2246858ejb.53.1679139514029; 
 Sat, 18 Mar 2023 04:38:34 -0700 (PDT)
Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id
 lm15-20020a170906980f00b008c76facbbf7sm2083248ejb.171.2023.03.18.04.38.33
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 18 Mar 2023 04:38:33 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Sebastian Tennant <sdt@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
In-Reply-To: <87leju4acd.fsf@HIDDEN> (Sebastian Tennant's message of "Sat, 
 18 Mar 2023 10:34:10 +0000")
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
 <87leju4acd.fsf@HIDDEN>
Date: Sat, 18 Mar 2023 12:38:32 +0100
Message-ID: <87wn3eqog7.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62237
Cc: Eli Zaretskii <eliz@HIDDEN>, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Sat, 18 Mar 2023 10:34:10 +0000, Sebastian Tennant <sdt@HIDDEN>=
 said:

    Sebastian> Quoth Eli Zaretskii <eliz@HIDDEN>
    Sebastian> on Sat, 18 Mar 2023 11:09:10 +0200:
    >>>>> [=E2=80=A6] machines you are able to do a rlogin and still keep t=
he
    >>>>> correct termcap/terminfo entry.  The terminal name is put in the
    >>>>> $TERM variable of all new windows.  Screen also sets the $TERMCAP
    >>>>> variable reflecting the capabilities of the virtual terminal
    >>>>> emulated. Notice that, however, on machines using the terminfo
    >>>>> database this variable has no effect.  Furthermore, the variable
    >>>>> $WINDOW is set to the window number of each window.
    >>>>>=20
    >>>> This seems to tell how 'screen' figures out the terminal name, not
    >>>> how it sets TERM.  I asked who and why sets TERM to
    >>>> screen.SOMETHING.
    >>>>=20
    >>> screen does: "The terminal name is put in the $TERM variable of all
    >>> new windows."
    >>>=20
    >> So how did Emacs ever succeed to work inside screen, then?  AFAIK,
    >> we never supported this form of TERM's value.

    Sebastian> If you discard the =E2=80=98screen.=E2=80=99 prefix by expli=
citly setting TERM in your
    Sebastian> .screenrc; for example:

    Sebastian>  term xterm-256color

    Sebastian> it makes no difference, i.e. colours are still broken (when =
COLORTERM
    Sebastian> is set to =E2=80=98truecolour=E2=80=99).

Hmm, I get 24-bit colour in that case. Presumably because screen +
gnome-terminal supports it.

Robert
--=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 18 Mar 2023 10:37:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 18 06:37:37 2023
Received: from localhost ([127.0.0.1]:46351 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdTwP-0002YW-1r
	for submit <at> debbugs.gnu.org; Sat, 18 Mar 2023 06:37:37 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34876)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pdTwM-0002YG-M6
 for 62237 <at> debbugs.gnu.org; Sat, 18 Mar 2023 06:37:35 -0400
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 <eliz@HIDDEN>)
 id 1pdTwH-0002tn-5U; Sat, 18 Mar 2023 06:37:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=9p2u/So88k7i7t3+VAv97GE2/0pUaWaGAIJJsiEqELE=; b=MV2VEcZ/CsVZXDI6cS2d
 BPPJzdN6WX8hMmm+bjy1h+QZmyI5Xmww7qsC+WDzbvwix6cc/PgwD87xPqu8nks7MQAzxsWgbnEU+
 Kan3GdRDz6TMX86dE/RC2YuPnJRZR1j0HQIbOxueaIynd0GGY/clA+1nnL7M9HEDsyLdhBeF6sPpl
 f+UqtrxPt0IxN7mt2YgLlZFmSlB9TjFlX+KSVSZ/A/UoqF85xwMhYb74vqVFHq0szuVnLCWFKar3v
 OXDmMSkZTcy0bnlK5ts5SRmEYVpTRRClGnP7E5J2IFNzs3SD8ygqhJGbAdBj8S8bWEU6aSPJxsNok
 UZiuFeGNHd82yA==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pdTwG-0004ka-KW; Sat, 18 Mar 2023 06:37:28 -0400
Date: Sat, 18 Mar 2023 12:37:30 +0200
Message-Id: <83r0tmbb11.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Robert Pluim <rpluim@HIDDEN>
In-Reply-To: <871qlms7h3.fsf@HIDDEN> (message from Robert Pluim on Sat, 18
 Mar 2023 11:02:16 +0100)
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN> <871qlms7h3.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62237
Cc: sdt@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: sdt@HIDDEN,  62237 <at> debbugs.gnu.org
> Date: Sat, 18 Mar 2023 11:02:16 +0100
> 
> >>>>> On Sat, 18 Mar 2023 11:09:10 +0200, Eli Zaretskii <eliz@HIDDEN> said:
> 
>     >> From: Robert Pluim <rpluim@HIDDEN>
>     >> Cc: sdt@HIDDEN,  62237 <at> debbugs.gnu.org
>     >> Date: Sat, 18 Mar 2023 10:05:49 +0100
>     >> 
>     >> >>>>> On Fri, 17 Mar 2023 20:55:23 +0200, Eli Zaretskii <eliz@HIDDEN> said:
>     >> >> machines you are able to do a rlogin and still keep the  correct  term‐
>     --> cap/terminfo  entry.  The terminal name is put in the $TERM variable of
>     >> >> all new windows.  Screen also sets the $TERMCAP variable reflecting the
>     >> >> capabilities of the virtual terminal emulated. Notice that, however, on
>     >> >> machines using the terminfo database this variable has no effect.  Fur‐
>     >> >> thermore, the variable $WINDOW is set to the window number of each win‐
>     >> >> dow.
>     >> 
>     Eli> This seems to tell how 'screen' figures out the terminal name, not how
>     Eli> it sets TERM.  I asked who and why sets TERM to screen.SOMETHING.
>     >> 
>     >> screen does: "The terminal name is put in the $TERM variable of all new windows."
> 
>     Eli> So how did Emacs ever succeed to work inside screen, then?  AFAIK, we
>     Eli> never supported this form of TERM's value.  Is this something
>     Eli> relatively new?
> 
> I donʼt know, Iʼm a tmuxian ;-)
> 
> Note that emacs works fine, itʼs just the colours that are off, and
> people sshʼing in to use screen would tend to set TERM themselves
> anyway.

Then I guess we should install your proposed fix in init_tty.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 18 Mar 2023 10:34:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 18 06:34:18 2023
Received: from localhost ([127.0.0.1]:46346 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdTtC-0002TD-9u
	for submit <at> debbugs.gnu.org; Sat, 18 Mar 2023 06:34:18 -0400
Received: from out2-smtp.messagingengine.com ([66.111.4.26]:47859)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sebyte+return-path@HIDDEN>) id 1pdTtB-0002T1-C3
 for 62237 <at> debbugs.gnu.org; Sat, 18 Mar 2023 06:34:17 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.nyi.internal (Postfix) with ESMTP id 23FD05C0075;
 Sat, 18 Mar 2023 06:34:12 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute4.internal (MEProxy); Sat, 18 Mar 2023 06:34:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebyte.me; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm2; t=
 1679135652; x=1679222052; bh=0+7gvzI+2kDDmkTQ+rpeODAjfAZZ2MVNS61
 pwzbGNOY=; b=PE43neVJlGSYq5AhMXZOi9kih7esiyCKG2XG3awAdDcLap+DxwF
 tnSkBjbxSX8u+vSQDLKezVacJiEUtfVo9zuzvbRXRs/Ftx6PAd4+/LRoG36pS5Jc
 5Cv02eHUuqIbLO8nraTrYucVd2Aa7PuVge8wHDP+cFGTl/HByYCSzBOulsOMep3M
 EOPjtEQld6uebnpa5gaVA4+rsNm2pJpzFGvm3OZamQ4qzk1ciODeJ4ihwz5OSs3s
 3oQRLghnM6TYVC6Lu4eJd4O8L7haK6i9ftV7KV30gmOBkJ1bkKsPvnn2nN6Qe8/U
 WOP860lh13kxA5T0Qow+PpKXpUJxnJlIwHA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1679135652; x=1679222052; bh=0+7gvzI+2kDDmkTQ+rpeODAjfAZZ2MVNS61
 pwzbGNOY=; b=jtpISYzr9VMkEq1gVHPZprCpIv+09iV6i9OFP5eyL4Lpc4uvxS6
 jEddkcIl0GEAhfD5CUo6TM4PU/lSBx5x0meyCZr4D9YNQCmyBXvlr0hNy60aruHb
 6+o6CtUsU/WPtImME9YCx7XEcHTW6VOxSgNHCwGJW15lovXOM70pn4v0BOJygJlw
 LqVc/8LBoUmnIB2zIVRpCHsAIXz/J6PQjqb1kGAFFS8+9RG3o5K1Eet2vZfnOGVP
 TP9aCK4h/QJQ22ngwRvTFgk8TQLsuqey6En2VvseCp8+a68cUhuSrpz+Bf4uzt55
 eScRw4OLWhM+eIhknRWszE2/Pl+GX0jiGWw==
X-ME-Sender: <xms:o5MVZBotwJEa6XIfY2xtg6-snDciDtAk-N6cJp6fdAexVx4wOuJ5KQ>
 <xme:o5MVZDqsRh91e-yOdvBLtdTSkpW78zaTbI7nVA_1CziCHgmG8oSSwZq-keYc70S8o
 vDLafuUkZy-8vMs4A>
X-ME-Received: <xmr:o5MVZOPIq9heZZRoH0GmGBC3_1sB0KDUsNqGyvylEyB02Ot9KqSNNPnxIL99BnN3dnQbW0o>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefgedgudehucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvvefufhffjgfkfgggtgfgsehtqhertddtreejnecuhfhrohhmpefuvggs
 rghsthhirghnucfvvghnnhgrnhhtuceoshguthesshgvsgihthgvrdhmvgeqnecuggftrf
 grthhtvghrnhepudetjeekjeehfeefueetveffheekkedthfekieeileeiueetgeejhffg
 fedufeffnecuffhomhgrihhnpehgnhhurdhorhhgpdhmrghnjedrohhrghenucevlhhush
 htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvggshihtvgdorhgv
 thhurhhnqdhprghthhesfhgrshhtmhgrihhlrdgtohhm
X-ME-Proxy: <xmx:o5MVZM7mx-fEyluzUFglpR0yJlSLOYSKHKgpOBgVA4PjKOBBg-WYLg>
 <xmx:o5MVZA4epu8rFqv-L5a8olwQg7TTKCKJJ4_M-0XxwWBwFyydNBBftg>
 <xmx:o5MVZEj8iaIZ2-PLZCz9ujgM-RVBXxbDtuPHJ-N7apVGYr9cwL6rtA>
 <xmx:pJMVZOS9O3IODgY2Jhw1knF-cIXF1gx6oY3V5xUua-vMGyyE_JJ6_A>
Feedback-ID: i9e78401f:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 18 Mar 2023 06:34:11 -0400 (EDT)
Received: from sebyte by balor with local (Exim 4.94.2)
 (envelope-from <sebyte@HIDDEN>)
 id 1pdTt4-001zh6-BT; Sat, 18 Mar 2023 10:34:10 +0000
From: Sebastian Tennant <sdt@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
Date: Sat, 18 Mar 2023 10:34:10 +0000
In-Reply-To: <83v8iybf49.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 18 Mar
 2023 11:09:10 +0200")
Message-ID: <87leju4acd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 62237
Cc: Robert Pluim <rpluim@HIDDEN>, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

Quoth Eli Zaretskii <eliz@HIDDEN>
on Sat, 18 Mar 2023 11:09:10 +0200:
>>>> [=E2=80=A6] machines you are able to do a rlogin and still keep the
>>>> correct termcap/terminfo entry.  The terminal name is put in the
>>>> $TERM variable of all new windows.  Screen also sets the $TERMCAP
>>>> variable reflecting the capabilities of the virtual terminal
>>>> emulated. Notice that, however, on machines using the terminfo
>>>> database this variable has no effect.  Furthermore, the variable
>>>> $WINDOW is set to the window number of each window.
>>>>
>>> This seems to tell how 'screen' figures out the terminal name, not
>>> how it sets TERM.  I asked who and why sets TERM to
>>> screen.SOMETHING.
>>>
>> screen does: "The terminal name is put in the $TERM variable of all
>> new windows."
>>
> So how did Emacs ever succeed to work inside screen, then?  AFAIK,
> we never supported this form of TERM's value.

If you discard the =E2=80=98screen.=E2=80=99 prefix by explicitly setting T=
ERM in your
.screenrc; for example:

 term xterm-256color

it makes no difference, i.e. colours are still broken (when COLORTERM
is set to =E2=80=98truecolour=E2=80=99).

> Is this something relatively new?

I started using screen in 2011 and I'm pretty sure it was prepending
=E2=80=98.screen=E2=80=99 then.

I'm not convinced this is the issue.  Remember, the colours were fine
under screen in Emacs 27.2.  There's something in the truecolor
support added in Emacs 28.1, specifically the respect paid to the
vaule of COLORTERM, that doesn't agree with screen.


It seems truecolor support was added to screen in July 2015:

 https://git.savannah.gnu.org/cgit/screen.git/log/?qt=3Dgrep&q=3Dtruecolor

Debian bullseye ships screen 4.8.0 which, according to:

 https://git.savannah.gnu.org/cgit/screen.git/

was released in 2000 which would suggest my screen does supprt
truecolor.  Oddly, my screen(1) manpage makes no mention of truecolor
support, yet various online manpages, for example:

 https://www.man7.org/linux/man-pages/man1/screen.1.html

document a =E2=80=98truecolor on|off=E2=80=99 configuraion option:

 truecolor [on|off]

 Enables truecolor support. Currently autodetection of truecolor
 support cannot be done reliably, as such it's left to user to
 enable. Default is off.  Known terminals that may support it are:
 iTerm2, Konsole, st.  Xterm includes support for truecolor escapes
 but converts them back to indexed 256 color space.

I've added the line:

 truecolor on

to my .screenrc and it doesn't barf, but it makes no diffference
either.  I shall investigate further.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 18 Mar 2023 10:02:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 18 06:02:28 2023
Received: from localhost ([127.0.0.1]:46232 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdTOO-0001Kp-0m
	for submit <at> debbugs.gnu.org; Sat, 18 Mar 2023 06:02:28 -0400
Received: from mail-wr1-f52.google.com ([209.85.221.52]:40563)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1pdTOJ-0001KX-M5
 for 62237 <at> debbugs.gnu.org; Sat, 18 Mar 2023 06:02:26 -0400
Received: by mail-wr1-f52.google.com with SMTP id t15so6360969wrz.7
 for <62237 <at> debbugs.gnu.org>; Sat, 18 Mar 2023 03:02:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20210112; t=1679133737;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=sqlnEjIviRjtdTuaI07yVXBz9peOkmq1Yt1KCN7s7s8=;
 b=ScdECN3jdWAzAOvZ0rHvbmwa48BdAtGY9FZczMS2CtelLRefX/0fKh3Lco0HV1INP6
 r9bAojwJWOWxka+JYkrTfAJtfZfTpQWV2SpQaDT1q5jOkONeioEDYQQ/JJ9ZA4A3JNnD
 vvxLv/KDWx48W6aFojQf6rv7OOsttTsvg0CH9BbThfMn5gdqLeqFzjHSUWxjdylHqTTz
 M8OytrifcXwmewgLsGAVx1/+cEWNnfWVSMlf34QpjFqsspq+3s4gp3Fw5viwMh8zW5WN
 fF/kUlnwnW0BluazUSZTHe1hgho8q1sFeG9p9kpEvTKrCbbLD3KSa2K5XQQfEoUlQDXk
 5s0w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1679133737;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=sqlnEjIviRjtdTuaI07yVXBz9peOkmq1Yt1KCN7s7s8=;
 b=akW+kGU1aya6upFn3q6TURcjV396tCBF1sf+2MVpj8eGqI7S0AXxJPzYuYMjvfaNZo
 jOb1foJ80uwcMVodrbvP2D80wTG0/HBVQ5xt2FbxA0liSfzGHoCe/f2YasoHHBa+WA45
 jzWdFz8nqN2g5wIazFpd9AS4LrrbxtWZeDSX6m3hUw7jc1Yc9j8IwET/k2ZmuvpgDX++
 lwAs5BFJNKSIk0wvpsTxQjYC1Iwao2r2GB6GjQwpch0/wk3X4cMpKds92FMKJgrm+Ncw
 8iTY8s4AZGhtHkgcevZZpnq73GkwXCNqRtC9JiBqyQyMVzJ5akn/b+e8XtbTXKtegmGP
 cbfA==
X-Gm-Message-State: AO0yUKWkuYud73hq93oFz+sSb+dgtU17D9ZAkyU1ePCPjcv+Q8N+lVaF
 l6jJnp1ZmY6N+D9cWCKhHkuJeYPXpt4=
X-Google-Smtp-Source: AK7set/NVBpcdG/OWfBTi0r4U5MppYsoVSSHXaWzeU8LNxWVLQhCiDc2a1iqKk00cGR25HNLDorpaA==
X-Received: by 2002:a05:6000:114c:b0:2ce:a9e9:5da2 with SMTP id
 d12-20020a056000114c00b002cea9e95da2mr9082186wrx.6.1679133737395; 
 Sat, 18 Mar 2023 03:02:17 -0700 (PDT)
Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id
 h18-20020a5d6e12000000b002c70851bfcasm3968863wrz.28.2023.03.18.03.02.16
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 18 Mar 2023 03:02:17 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
In-Reply-To: <83v8iybf49.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 18 Mar
 2023 11:09:10 +0200")
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
 <87o7oqsa36.fsf@HIDDEN> <83v8iybf49.fsf@HIDDEN>
Date: Sat, 18 Mar 2023 11:02:16 +0100
Message-ID: <871qlms7h3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62237
Cc: sdt@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Sat, 18 Mar 2023 11:09:10 +0200, Eli Zaretskii <eliz@HIDDEN> said:

    >> From: Robert Pluim <rpluim@HIDDEN>
    >> Cc: sdt@HIDDEN,  62237 <at> debbugs.gnu.org
    >> Date: Sat, 18 Mar 2023 10:05:49 +0100
    >>=20
    >> >>>>> On Fri, 17 Mar 2023 20:55:23 +0200, Eli Zaretskii <eliz@HIDDEN=
g> said:
    >> >> machines you are able to do a rlogin and still keep the  correct =
 term=E2=80=90
    --> cap/terminfo  entry.  The terminal name is put in the $TERM variabl=
e of
    >> >> all new windows.  Screen also sets the $TERMCAP variable reflecti=
ng the
    >> >> capabilities of the virtual terminal emulated. Notice that, howev=
er, on
    >> >> machines using the terminfo database this variable has no effect.=
  Fur=E2=80=90
    >> >> thermore, the variable $WINDOW is set to the window number of eac=
h win=E2=80=90
    >> >> dow.
    >>=20
    Eli> This seems to tell how 'screen' figures out the terminal name, not=
 how
    Eli> it sets TERM.  I asked who and why sets TERM to screen.SOMETHING.
    >>=20
    >> screen does: "The terminal name is put in the $TERM variable of all =
new windows."

    Eli> So how did Emacs ever succeed to work inside screen, then?  AFAIK,=
 we
    Eli> never supported this form of TERM's value.  Is this something
    Eli> relatively new?

I don=CA=BCt know, I=CA=BCm a tmuxian ;-)

Note that emacs works fine, it=CA=BCs just the colours that are off, and
people ssh=CA=BCing in to use screen would tend to set TERM themselves
anyway.

Robert
--=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 18 Mar 2023 09:09:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 18 05:09:15 2023
Received: from localhost ([127.0.0.1]:46192 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdSYt-0005vK-Fb
	for submit <at> debbugs.gnu.org; Sat, 18 Mar 2023 05:09:15 -0400
Received: from eggs.gnu.org ([209.51.188.92]:38454)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pdSYr-0005v8-Qa
 for 62237 <at> debbugs.gnu.org; Sat, 18 Mar 2023 05:09:14 -0400
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 <eliz@HIDDEN>)
 id 1pdSYm-0004KT-Hu; Sat, 18 Mar 2023 05:09:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=8T9PigOAX5o3f++CQTMlqmccGS20M/65wjxri7s6M4w=; b=C2Ml3cqp778FW3bfQRs9
 iGkECLzgvOKW0J91HX8RHvO2dIgZ0pSe2Y1GJGK3mv6IaA2846Llzb/nW60a1+kFiXZfJYvSgQWC9
 43wOcRsv8c/nbJPxUUlTsVQ+ZmZnAYX6TEhxs3NcZtGFriV7xeBIi6Ev9b794Yp+det7qXEwdnla3
 p9U2JNBYfXlFx64JEjBLzuMx558jzRzdD51EiO+i+Hf3ZbROlYZ/0nmuEf33l+r2iY4INBbR+rh+C
 GUGj7flRCqFWQk9ByU+LbOdeAB335aULFLPb7B0/A3qNUvH+eEkcLwwq9zswsWj1hg7qeHRn9t18B
 rIBHeahRpxp15g==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pdSYl-0001RM-P4; Sat, 18 Mar 2023 05:09:08 -0400
Date: Sat, 18 Mar 2023 11:09:10 +0200
Message-Id: <83v8iybf49.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Robert Pluim <rpluim@HIDDEN>
In-Reply-To: <87o7oqsa36.fsf@HIDDEN> (message from Robert Pluim on Sat, 18
 Mar 2023 10:05:49 +0100)
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN> <87o7oqsa36.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62237
Cc: sdt@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: sdt@HIDDEN,  62237 <at> debbugs.gnu.org
> Date: Sat, 18 Mar 2023 10:05:49 +0100
> 
> >>>>> On Fri, 17 Mar 2023 20:55:23 +0200, Eli Zaretskii <eliz@HIDDEN> said:
>     >> machines you are able to do a rlogin and still keep the  correct  term‐
>     --> cap/terminfo  entry.  The terminal name is put in the $TERM variable of
>     >> all new windows.  Screen also sets the $TERMCAP variable reflecting the
>     >> capabilities of the virtual terminal emulated. Notice that, however, on
>     >> machines using the terminfo database this variable has no effect.  Fur‐
>     >> thermore, the variable $WINDOW is set to the window number of each win‐
>     >> dow.
> 
>     Eli> This seems to tell how 'screen' figures out the terminal name, not how
>     Eli> it sets TERM.  I asked who and why sets TERM to screen.SOMETHING.
> 
> screen does: "The terminal name is put in the $TERM variable of all new windows."

So how did Emacs ever succeed to work inside screen, then?  AFAIK, we
never supported this form of TERM's value.  Is this something
relatively new?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 18 Mar 2023 09:05:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 18 05:05:59 2023
Received: from localhost ([127.0.0.1]:46183 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdSVj-0005qI-A2
	for submit <at> debbugs.gnu.org; Sat, 18 Mar 2023 05:05:59 -0400
Received: from mail-wr1-f54.google.com ([209.85.221.54]:41709)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1pdSVh-0005q5-Rq
 for 62237 <at> debbugs.gnu.org; Sat, 18 Mar 2023 05:05:58 -0400
Received: by mail-wr1-f54.google.com with SMTP id h17so6285861wrt.8
 for <62237 <at> debbugs.gnu.org>; Sat, 18 Mar 2023 02:05:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20210112; t=1679130351;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=KDs9WDgy/ROyxgd0JLUOxndSQQGAdM/hAUY8owGgKEM=;
 b=IUH6p0xxiBKKvq1XzwNGWBx/JimRpZiY1B5GLN7xPQo4QfResJP0WDSy0zV6CLyfNH
 vB0R2TFh+zCs0EwLuYNB2wpYxafEX+q2Nl7rimnvGUb7aR7nAp4RLKMYo9A9/OF9BdgO
 y2HB/We0fFunbxvn7FwUyVBdh9/MbvjPzR5YFYc50DHBl8UFverbiRi5E194AAguZBTU
 kQFNqWeW0TW4uUmDGUE59gQqytuZvQCNFpYh6FxNg6l4TS4NSe5pD448COwqROVx9WP6
 zjF58HvD9ERiiq/D3r6GXt5h2HRNqDBb0pQsRR+XfFz/zSzT9fHdaxRv+haUxfUdcV5N
 Gt+Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1679130351;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=KDs9WDgy/ROyxgd0JLUOxndSQQGAdM/hAUY8owGgKEM=;
 b=W7cN9vSzDRWHQr8HInVHn0eblnGaadEANU0ArfWyFWXF2g4pLGp/zFG7Uieh1rFb3b
 vzaWzYhN2xoZ6QRsdUK3E/EAtIL9SN+4GZJTJ0Y3HNnfHQtaDmyQT7d9QuUys8qX6dym
 mLFEmpPJwkmhY8tzDyrdxD6ije8h6F39AEZZDwr+JhV6O1Kb3hhgSQzcJ+n1vEagW5Yn
 wsTKUC8x014hs9IJbkKh6LL3+cWuolQDor5ZBFZ0snAoWfXT9Ds86iHm91bVEspTpE8M
 /87P0oWrrYbgLokN8it599TyLxSzuFIPICftVcQvP+4pQ2HzVHBnLfI49rVw0u+EtY4l
 AQqg==
X-Gm-Message-State: AO0yUKWO3XiSxQ7+ZdJrGTPFy7U74plsGmFuw8DcCV4Leml9D49CsVMB
 32dR76Bl+7Gfoa/38DRXaw1uJqrG50E=
X-Google-Smtp-Source: AK7set91APYM3zW7MkUi1iNeFV6PFUclc834HgN+xCWb/zXPZJ6AqVpr93TkKHrSM4PznamJJICRGw==
X-Received: by 2002:a5d:4c4a:0:b0:2cf:e4ab:3725 with SMTP id
 n10-20020a5d4c4a000000b002cfe4ab3725mr9535262wrt.51.1679130351179; 
 Sat, 18 Mar 2023 02:05:51 -0700 (PDT)
Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id
 e23-20020a5d5957000000b002cfefa50a8esm3811661wri.98.2023.03.18.02.05.50
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 18 Mar 2023 02:05:50 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
In-Reply-To: <83pm97cin8.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 17 Mar
 2023 20:55:23 +0200")
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
 <87sfe3s26k.fsf@HIDDEN> <83pm97cin8.fsf@HIDDEN>
Date: Sat, 18 Mar 2023 10:05:49 +0100
Message-ID: <87o7oqsa36.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62237
Cc: sdt@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Fri, 17 Mar 2023 20:55:23 +0200, Eli Zaretskii <eliz@HIDDEN> said:
    >> machines you are able to do a rlogin and still keep the  correct  te=
rm=E2=80=90
    --> cap/terminfo  entry.  The terminal name is put in the $TERM variabl=
e of
    >> all new windows.  Screen also sets the $TERMCAP variable reflecting =
the
    >> capabilities of the virtual terminal emulated. Notice that, however,=
 on
    >> machines using the terminfo database this variable has no effect.  F=
ur=E2=80=90
    >> thermore, the variable $WINDOW is set to the window number of each w=
in=E2=80=90
    >> dow.

    Eli> This seems to tell how 'screen' figures out the terminal name, not=
 how
    Eli> it sets TERM.  I asked who and why sets TERM to screen.SOMETHING.

screen does: "The terminal name is put in the $TERM variable of all new win=
dows."

Robert
--=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 17 Mar 2023 20:18:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 17 16:18:57 2023
Received: from localhost ([127.0.0.1]:45739 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdGXR-0005Ul-CG
	for submit <at> debbugs.gnu.org; Fri, 17 Mar 2023 16:18:57 -0400
Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:34973)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sebyte+return-path@HIDDEN>) id 1pdGXP-0005UW-Sl
 for 62237 <at> debbugs.gnu.org; Fri, 17 Mar 2023 16:18:56 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.west.internal (Postfix) with ESMTP id CFD40320030E;
 Fri, 17 Mar 2023 16:18:49 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Fri, 17 Mar 2023 16:18:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebyte.me; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm2; t=
 1679084329; x=1679170729; bh=ghT9qZwpw1LLF6nXAgaSGYeKWT6AwtXX6nP
 Zp3ll5hA=; b=WfwG0MipONGuCaFA6zyIITexo/bRHeqICRb9jcaQ5Sz2MS7M2g5
 PBXeufVVqidKOAgO7qvi4Hr2IiXv+MGpt5w8eZX1CsC3t+wkgQnu0cAuw7LCZjRa
 lx7XeteKtOCvm4DipHkWjZVbVMg47Mv3zSkQJjb1W0/mD7k3E5dCS7FboEW42zUL
 fQBtPiZ7O+A8+84acNBRiQLq8Q6UV/WJSZMfU1SwHDvv5XCCt2T88fTDoe15prxW
 44XCgWFhsm9VsVJCbWEPHCDAZxRVXY2iXf7OFRl1UHuPJjmQqr8hKO7i//KX9u+z
 hLXApCfTDAN9dSEDyXaagFFUJdSRHT8R2KQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1679084329; x=1679170729; bh=ghT9qZwpw1LLF6nXAgaSGYeKWT6AwtXX6nP
 Zp3ll5hA=; b=oYiFy0LYI7XipGs6sDjQFERHB6Gf9ksJh5VqmvzFC6YgqKyzn4k
 CJR34DaFmpcmYneMWF1L/Khk6TmaxA7d5yYeqTOcS7RLatp8sXheQ+lFQ4VPzMvO
 F+5HnWHY9uINjl61FSxpuej6y4x9kqKzQTGOGHgfVJP2ZNLRq8D/yz2vOhKqWPZQ
 wJGHkYEfZCyauIdOZ9Bw0CpOlItJgJjG93OsR9smqcqbP87UZBG0A0KOiRY5YlAx
 ZJCQTmbTcHB2yqrptk0ve9bWGqW5Fwtt+zScBjURwS++MckEXpREphMmehscl+AL
 a/M/dEqTYyRzbzI3yE2lW9gVzTJ37rTgW4Q==
X-ME-Sender: <xms:KcsUZJ83ysVzJ6zSs-3GJGEEEOdq187SXfgBOLVxLMgBAP6dTayaBA>
 <xme:KcsUZNuknFX1VtG7pM7CPo3xZ41x-F4L1jchix5qsc5V8L3OwGEDspkEK_VVo4jL4
 h3Nulx7qukintP9KA>
X-ME-Received: <xmr:KcsUZHBLEwuBAuqfcNNP8sbiRKSPy7bTOLJ6MAVWMnQjqFSCVYtEsBTqJkMC_SS2TB1HJOk>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefvddgudefgecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvfevufhfffgjkfgfgggtgfesthhqredttderjeenucfhrhhomhepufgv
 sggrshhtihgrnhcuvfgvnhhnrghnthcuoehsughtsehsvggshihtvgdrmhgvqeenucggtf
 frrghtthgvrhhnpedujeevgeejgedvtedvvdfgveduleekteekveetueduhedvjedtjeef
 hfeffeeludenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuih
 iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshgvsgihthgvodhrvghtuhhrnhdq
 phgrthhhsehfrghsthhmrghilhdrtghomh
X-ME-Proxy: <xmx:KcsUZNcqIf0BjSKwMKvsrwZol2YK92fIj9k67EoFETfyilosOwMe1g>
 <xmx:KcsUZOMrFMApqMkAPqBUT6GtAfHhw6QXadguTVhc6Y6JD4KsEANlHw>
 <xmx:KcsUZPk9L7i5q1KsvZZcyxMX3xNiobJdvs4CubvV07Bq8Clmvyc-1g>
 <xmx:KcsUZIVm1AionkVLptCGYAA7w53l19eNGQlYQLjDHtWcH4BeZG5l3g>
Feedback-ID: i9e78401f:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 17 Mar 2023 16:18:48 -0400 (EDT)
Received: from sebyte by balor with local (Exim 4.94.2)
 (envelope-from <sebyte@HIDDEN>)
 id 1pdGXH-001wmv-7b; Fri, 17 Mar 2023 20:18:47 +0000
From: Sebastian Tennant <sdt@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87y1nv4af0.fsf@HIDDEN> <83zg8bcosc.fsf@HIDDEN>
 <87ttyj44cp.fsf@HIDDEN> <83lejvciaz.fsf@HIDDEN>
 <83ilezcg3r.fsf@HIDDEN>
Date: Fri, 17 Mar 2023 20:18:47 +0000
In-Reply-To: <83ilezcg3r.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 17 Mar
 2023 21:50:16 +0200")
Message-ID: <87pm973zdk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 62237
Cc: 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

Quoth Eli Zaretskii <eliz@HIDDEN>
on Fri, 17 Mar 2023 21:02:44 +0200:
>>> No, Emacs 30 is good enough.  (Your report says Emacs 28.1, which
>>> is why I asked.)
>>
>> It's easy to miss the "or higher".
>
> The "or higher" is not useful because it says nothing about the
> versions you actually tested.  It could be Emacs 28.2, for example.
> Please always tell all the details without assuming that our crystal
> balls are clear enough to see them.

Fair enough.  Apologies for the lack of clarity.

>>> What is TERM set to on that system?
>>
>> In a plain GNOME Terminal, i.e. outside screen:
>>
>>  xterm-256color
>
> That's 256 colors, not 64-bit true-color terminal, AFAIU.

You may be right.  My understanding is very limited in this area.

>>> It also says that your terminal actually supports only 88 colors.
>>
>> How do you infer that?
>
> By looking at the color names.

Ah... OK.

>>> So you should unset COLORTERM in your environment
>>
>> That's precisely the fix I discovered yesterday.
>
> Then I guess this bug can be closed?

I suppose so.

It felt like an Emacs bug because I was happily using Emacs 27.2 and
when I upgraded to 28.1, the colours were broken all of a sudden, but
yes, the fault may be with screen.

>> According to:
>>
>>  https://github.com/termstandard/colors
>>
>> command:
>>
>>  $ printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n"
>>
>> shows your terminal is capable of truecolor if the word TRUECOLOR is
>> printed in brown.  According to the result of this test, GNOME
>> Terminal (3.38.3) _is_ truecolor enabled.
>
> Which standard of true color does it support?

I don't know how to answer this question.

>> I can observe the same broken colours in xterm (under the same
>> conditions) shipped by Debian bullseye.
>>
>> I'm sure it has to do with screen and will investigate whther or
>> not my version of screen supports truecolor.
>
> Thanks.

Haven't had time to investigate yet, but will do tomorrow.


Quoth Eli Zaretskii <eliz@HIDDEN>
on Fri, 17 Mar 2023 21:50:16 +0200:
>>> What is TERM set to on that system?
>>
>> In a plain GNOME Terminal, i.e. outside screen:
>>
>>  xterm-256color
>
> And what is it set to _inside_ screen?

I set it to screen.gnome in my .screenrc, but this has no bearing on
the issue, i.e. if I comment out the =E2=80=98term screen.gnome=E2=80=99 li=
ne in my
.screenrc, TERM is set to screen.xterm-256color (as Robert pointed
out) and the colors are still broken.

Incidentally, I use screen.gnome because it limits the colors to eight
(and I prefer the simplicity of just eight colors).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 17 Mar 2023 19:50:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 17 15:50:45 2023
Received: from localhost ([127.0.0.1]:45717 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdG69-0004ok-3E
	for submit <at> debbugs.gnu.org; Fri, 17 Mar 2023 15:50:45 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58356)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pdG68-0004oX-1M
 for 62237 <at> debbugs.gnu.org; Fri, 17 Mar 2023 15:50:44 -0400
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 <eliz@HIDDEN>)
 id 1pdG62-0006dU-6c; Fri, 17 Mar 2023 15:50:38 -0400
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=3Xhg41jVioivy83q4g/aGIw0ckZ06ZWGX/zhvc/qEuo=; b=VbcZh4C6g90W
 vQXZVj4Uud7k5MnhupZQNt4fHYP6UcVmhamdfQ6GtLWBrIP/1oQYX8YTmARsFbexhxnclAF1SOuwo
 gvgLJ/wGiWFJCZ8F4Ij6vsQJ6PFD24axomwfgC7a0aOCkO50KORqonsT05WAswH+ld6e7yhagQArD
 aVXQV9kq5EmA7/phnv3ZTuGpa6KAZZ/mAoeGHvzx6vCga5eHlP5T5cZIeJoCE/sMisl58nafE/Spj
 DQK11nPLk7XH/4ct4TkULghD2N4tfdR7Ldg/xiKWSTQE34l2cSE4JjwIR+BlLUMABRFv/sntl5Dd3
 zj8xDC/U5VpZXRRagQ7mZg==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pdG5f-0006T7-7Y; Fri, 17 Mar 2023 15:50:37 -0400
Date: Fri, 17 Mar 2023 21:50:16 +0200
Message-Id: <83ilezcg3r.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: sdt@HIDDEN
In-Reply-To: <83lejvciaz.fsf@HIDDEN> (message from Eli Zaretskii on Fri, 17
 Mar 2023 21:02:44 +0200)
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87y1nv4af0.fsf@HIDDEN> <83zg8bcosc.fsf@HIDDEN> <87ttyj44cp.fsf@HIDDEN>
 <83lejvciaz.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62237
Cc: 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 62237 <at> debbugs.gnu.org
> Date: Fri, 17 Mar 2023 21:02:44 +0200
> From: Eli Zaretskii <eliz@HIDDEN>
> 
> > > What is TERM set to on that system?
> > 
> > In a plain GNOME Terminal, i.e. outside screen:
> > 
> >  xterm-256color

And what is it set to _inside_ screen?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 17 Mar 2023 19:02:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 17 15:02:50 2023
Received: from localhost ([127.0.0.1]:45644 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdFLm-0003Zf-0q
	for submit <at> debbugs.gnu.org; Fri, 17 Mar 2023 15:02:50 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60818)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pdFLk-0003ZS-CM
 for 62237 <at> debbugs.gnu.org; Fri, 17 Mar 2023 15:02:48 -0400
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 <eliz@HIDDEN>)
 id 1pdFLf-0007Lp-2E; Fri, 17 Mar 2023 15:02:43 -0400
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=LSmapKqK0sDop3+Oafi9QJLHRj2qABfqBHV5UAw6r2U=; b=cGbJcSS+egYP
 L2HrixmdRZEa2AMlRDxXTihSK0SnCUm0ppqt9m8P2Nucy+/NM7ghwetaZXTE+KuiI4gpZbLpspVfp
 oGneN34/uCbsZ0FtiA4Qz/2Lsvpa8+SAKb3D1vw9txQCKY72aB6XJSnVFAZrK7EU//BlToWL7D4hV
 R4It9vid0zxeOlmjTY5bOyD6TyTzvFC6QQy1G2l1bqIx22lpwF3V7pvRxUneRJR7B+kskg38GREP6
 Q8M7y8nnzes9URcKPEaXhRXGg8VfkZQCaQWxJrBXwNgEGtJrEIJxUBPA5+jglZjogwPlszzJb5RPr
 CGWlW1tS2nWA4bwWytZgBQ==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pdFLe-0005oC-H1; Fri, 17 Mar 2023 15:02:42 -0400
Date: Fri, 17 Mar 2023 21:02:44 +0200
Message-Id: <83lejvciaz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sebastian Tennant <sdt@HIDDEN>
In-Reply-To: <87ttyj44cp.fsf@HIDDEN> (message from Sebastian Tennant on
 Fri, 17 Mar 2023 18:31:18 +0000)
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87y1nv4af0.fsf@HIDDEN> <83zg8bcosc.fsf@HIDDEN> <87ttyj44cp.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62237
Cc: 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Sebastian Tennant <sdt@HIDDEN>
> Cc: 62237 <at> debbugs.gnu.org
> Date: Fri, 17 Mar 2023 18:31:18 +0000
> 
> > No, Emacs 30 is good enough.  (Your report says Emacs 28.1, which is
> > why I asked.)
> 
> It's easy to miss the "or higher".

The "or higher" is not useful because it says nothing about the
versions you actually tested.  It could be Emacs 28.2, for example.
Please always tell all the details without assuming that our crystal
balls are clear enough to see them.

> > What is TERM set to on that system?
> 
> In a plain GNOME Terminal, i.e. outside screen:
> 
>  xterm-256color

That's 256 colors, not 64-bit true-color terminal, AFAIU.

> > It also says that your terminal actually supports only 88 colors.
> 
> How do you infer that?

By looking at the color names.

> > So you should unset COLORTERM in your environment
> 
> That's precisely the fix I discovered yesterday.

Then I guess this bug can be closed?

> According to:
> 
>  https://github.com/termstandard/colors
> 
> command:
> 
>  $ printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n"
> 
> shows your terminal is capable of truecolor if the word TRUECOLOR is
> printed in brown.  According to the result of this test, GNOME
> Terminal (3.38.3) _is_ truecolor enabled.

Which standard of true color does it support?

> I can observe the same broken colours in xterm (under the same
> conditions) shipped by Debian bullseye.
> 
> I'm sure it has to do with screen and will investigate whther or not
> my version of screen supports truecolor.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 17 Mar 2023 18:55:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 17 14:55:29 2023
Received: from localhost ([127.0.0.1]:45629 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdFEf-0003NJ-Br
	for submit <at> debbugs.gnu.org; Fri, 17 Mar 2023 14:55:29 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53176)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pdFEd-0003N7-Pr
 for 62237 <at> debbugs.gnu.org; Fri, 17 Mar 2023 14:55:28 -0400
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 <eliz@HIDDEN>)
 id 1pdFEY-0004e1-4s; Fri, 17 Mar 2023 14:55:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=er8mI40MPHpC7SFHPcinU9BnC2E49WrqU1Dg52uGFNA=; b=YbPZJD2FLiVLIeP5mRhJ
 fLpVqX3tgU0yKz8XIYqJRCsGkUrJs8yn4g7tFuCdXVXkE3YPKJSVZndexAX8JfqzOD/phcsyqfcv+
 Fm45kol8dXDYjd2vRwk6HU6+v235bjmdjgWd7zSdOGgRP9J+cU3xmKdkeIcDf51ueZgCshhiawRip
 URSRZ6a224Ft861FF22p9JETsR8YiBCQNKEKn3C4xIc5Sm7055fS6jausakOOhCV+rDriDb3pD7C5
 K2KsFTtpO9PxkspZgq1atM/6cE0z3U+FSppCg1bzWJVX+0488IrSBbdFXMYUCaRDN/Cr8NTjy7oEH
 QUZslTtfv3fQVA==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pdFEX-0002JY-JZ; Fri, 17 Mar 2023 14:55:21 -0400
Date: Fri, 17 Mar 2023 20:55:23 +0200
Message-Id: <83pm97cin8.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Robert Pluim <rpluim@HIDDEN>
In-Reply-To: <87sfe3s26k.fsf@HIDDEN> (message from Robert Pluim on Fri, 17
 Mar 2023 18:44:19 +0100)
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN> <87sfe3s26k.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62237
Cc: sdt@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: sdt@HIDDEN,  62237 <at> debbugs.gnu.org
> Date: Fri, 17 Mar 2023 18:44:19 +0100
> 
>     Eli> Is this screen.FOO format documented somewhere in screen's
>     Eli> documentation?
> 
> Yes:
> 
>        When screen tries to figure out a terminal name for  itself,  it  first
>        looks  for an entry named "screen.<term>", where <term> is the contents
>        of your $TERM variable.  If no such entry exists, screen tries "screen"
>        (or  "screen-w"  if  the terminal is wide (132 cols or more)).  If even
>        this entry cannot be found, "vt100" is used as a substitute.
> 
>        The idea is that if you have a terminal which doesn't support an impor‐
>        tant  feature  (e.g.  delete  char or clear to EOS) you can build a new
>        termcap/terminfo entry for screen (named "screen.<dumbterm>") in  which
>        this  capability  has been disabled. If this entry is installed on your
>        machines you are able to do a rlogin and still keep the  correct  term‐
> -->    cap/terminfo  entry.  The terminal name is put in the $TERM variable of
>        all new windows.  Screen also sets the $TERMCAP variable reflecting the
>        capabilities of the virtual terminal emulated. Notice that, however, on
>        machines using the terminfo database this variable has no effect.  Fur‐
>        thermore, the variable $WINDOW is set to the window number of each win‐
>        dow.

This seems to tell how 'screen' figures out the terminal name, not how
it sets TERM.  I asked who and why sets TERM to screen.SOMETHING.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 17 Mar 2023 18:31:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 17 14:31:29 2023
Received: from localhost ([127.0.0.1]:45616 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdErR-0002lL-Hi
	for submit <at> debbugs.gnu.org; Fri, 17 Mar 2023 14:31:29 -0400
Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:58053)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sebyte+return-path@HIDDEN>) id 1pdErO-0002l6-Ox
 for 62237 <at> debbugs.gnu.org; Fri, 17 Mar 2023 14:31:27 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.west.internal (Postfix) with ESMTP id DF71B3200917;
 Fri, 17 Mar 2023 14:31:20 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Fri, 17 Mar 2023 14:31:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebyte.me; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to; s=fm2; t=
 1679077880; x=1679164280; bh=ebvptK3glKOcSuH0rwNS5O+ET/kDOKi8MIh
 5dj20VAA=; b=EyDecS/ArCKDiACjZD3xI3u1Mf4ge3knDE9q42ps7d5YTOW/8gB
 qboaXMnV0dmxBXeQDHNwCPKxBsF6f4SQcY38lVMOMWSn7y70o5LX5VKX+W8ei620
 FfDQFpEL592bGvTlpER+H31D2f4M1Wm/SQz2EC7WZ2HghIw9L4Deis0LdrXngtsi
 O0zH1kVru1d8Kpvnr2ZaozU9hfvK5YMubZ/ljGl+SPjSVk/+xK0qZtHIbYeai5rP
 /C6ejeR3YzKiEeNscZPcu2UDfN4w/7+vWNpEkM9avh99JfGNhi8jkmruOkuGb1oa
 HK2r2lCJOGDBhCNOLoYiXymJnf5WPG0pemg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:sender:subject:subject:to:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1679077880; x=1679164280; bh=ebvptK3glKOcSuH0rwNS5O+ET/kDOKi8MIh
 5dj20VAA=; b=H4qShAq6Hm6Fm69ZkjWu2w8BBX+wrVOi3hNsL/xD59UQJYBCCng
 EonL9uy8Q82Id0Nx9sn3aNZsmWOL0syNWaUJFj9YvevMO9NPQcvGB/WAzs52pE7c
 Nk28I/STKIxUUSiu+kV7yFT/YvrlQTFe4n5v0VObnNKruaBIlYrJT1eXYAQklg5R
 27UKDaI3Tj0HlPkIr0NoYSlw94FQU+GPM58bS9kErhJIMtqNgfxczQofTzfiAD3n
 LFrZgPIJ+P20H/NVRnl/6QbS+kaqrFZMjLSABWE6LNUwm4ywk2nXYPClMX3YX9BE
 gWcuCan8nns0P+ZgQx0IMNDTeJ9eOnP8/2A==
X-ME-Sender: <xms:-LEUZHJZBho25DomLplGjJsEwKaG_U0VP6etbDdMRvqHbHmAKwkBmw>
 <xme:-LEUZLKdHmKnxQ1QNAIit1_dX7-j2LQetc6guMB9sLRNO9qtlqEClcZos07YsS0dq
 IoL0hZop8sUqkOlEA>
X-ME-Received: <xmr:-LEUZPtoL_xgn0OnfdHRD1z4UHciQIUkijZFtsDzjqkyOju_m7H1m8-DkPreiHtZxWXarsU>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefvddguddufecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvfevufhfffgjkfgfgggtgfesthhqredttderjeenucfhrhhomhepufgv
 sggrshhtihgrnhcuvfgvnhhnrghnthcuoehsughtsehsvggshihtvgdrmhgvqeenucggtf
 frrghtthgvrhhnpeetteevteeileevleduledvgfduleejgeekgfdtjedttdefieeiiedu
 gffhtddufeenucffohhmrghinhepshgvsgihthgvrdhmvgdpghhithhhuhgsrdgtohhmne
 cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshgvsgih
 thgvodhrvghtuhhrnhdqphgrthhhsehfrghsthhmrghilhdrtghomh
X-ME-Proxy: <xmx:-LEUZAahyK62RzG3z-ta4JbaIoDFJRJOtmO2F5UrUikPkiq32BL-WQ>
 <xmx:-LEUZOa344157kY-qLhBfqHjMeWHLgZc-dQbu6_JEddN7uV6ksZaUw>
 <xmx:-LEUZECNHH6n3HP1Mo2-t3LfOVEwOuiWtmm8a0SkBBYFYp-fL94rEg>
 <xmx:-LEUZHCK5C38kQx_9RVK6xO4R5QbJcvY6PTbXUnUs2ps5J6x9mDmsg>
Feedback-ID: i9e78401f:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 17 Mar 2023 14:31:20 -0400 (EDT)
Received: from sebyte by balor with local (Exim 4.94.2)
 (envelope-from <sebyte@HIDDEN>)
 id 1pdErG-001wTE-KS; Fri, 17 Mar 2023 18:31:18 +0000
From: Sebastian Tennant <sdt@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87y1nv4af0.fsf@HIDDEN> <83zg8bcosc.fsf@HIDDEN>
Date: Fri, 17 Mar 2023 18:31:18 +0000
In-Reply-To: <83zg8bcosc.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 17 Mar
 2023 18:42:43 +0200")
Message-ID: <87ttyj44cp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 62237
Cc: 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)



Quoth Eli Zaretskii <eliz@HIDDEN>
on Fri, 17 Mar 2023 18:42:43 +0200:
>> From: Sebastian Tennant <sdt@HIDDEN>
>> Cc: 62237 <at> debbugs.gnu.org
>> Date: Fri, 17 Mar 2023 16:20:19 +0000
>>
>> [=E2=80=A6]
>> The photos happen to show an Emacs I built from master a couple of
>> days ago, i.e. Emacs 30.0.50.  If you'd still like me to test branch
>> emacs-29, then let me know and I will happily do so.
>
> No, Emacs 30 is good enough.  (Your report says Emacs 28.1, which is
> why I asked.)

It's easy to miss the "or higher".

>> [=E2=80=A6]
>> This lead me to investigate whether or not COLORTERM was set in my
>> environment.  I'm running Debian bullseye and terminfo is installed
>> but, nevertheless, GNOME Terminal sets COLORTERM=3Dtruecolor by default.
>
> What is TERM set to on that system?

In a plain GNOME Terminal, i.e. outside screen:

 xterm-256color

>> [=E2=80=A6]
>>
>>  https://download.sebyte.me/misc/truecolor-active.png
>>  https://download.sebyte.me/misc/truecolor-inactive.png
>
> This seems to say that your terminal isn't compatible with what
> Emacs assumes under COLORTERM=3Dtruecolor.

It would seem so.

> It also says that your terminal actually supports only 88 colors.

How do you infer that?

> So you should unset COLORTERM in your environment

That's precisely the fix I discovered yesterday.

> or use another terminal emulator (like 256-color Xterm or some
> really true-color emulator).

According to:

 https://github.com/termstandard/colors

command:

 $ printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n"

shows your terminal is capable of truecolor if the word TRUECOLOR is
printed in brown.  According to the result of this test, GNOME
Terminal (3.38.3) _is_ truecolor enabled.

I can observe the same broken colours in xterm (under the same
conditions) shipped by Debian bullseye.

I'm sure it has to do with screen and will investigate whther or not
my version of screen supports truecolor.

Seb




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 17 Mar 2023 17:44:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 17 13:44:28 2023
Received: from localhost ([127.0.0.1]:45563 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdE7w-0001T8-JC
	for submit <at> debbugs.gnu.org; Fri, 17 Mar 2023 13:44:28 -0400
Received: from mail-wr1-f46.google.com ([209.85.221.46]:43705)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1pdE7v-0001Su-2b
 for 62237 <at> debbugs.gnu.org; Fri, 17 Mar 2023 13:44:27 -0400
Received: by mail-wr1-f46.google.com with SMTP id l12so5154432wrm.10
 for <62237 <at> debbugs.gnu.org>; Fri, 17 Mar 2023 10:44:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20210112; t=1679075061;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=221RX4HHxE2jTFSxStPS8TYkzbvxIt7u8SjOUGwQcpU=;
 b=HO84lBZqvgeOR8ele3tqXejBibbndAX04zk4UurOJg7LJNGbeFNqUN5nNnFmwrts0f
 eknuStY9G/NDHO0qoUmQ1uqbo25/pZ+IK0/E4xMeFpSrNLWeQnhdba7G5pXw90E28wPp
 CDsJVqfdCBi4JrBVt4gyYySeBIo9vuZ8S0OG8+xvQ7rDBSrftjEeoZq+5hwCvLUQFtyF
 B7McOJTcTdsAI5bRigJ2KQpzm/xGP9teq5djWyAOezYX8X3FZ67IGkvvaPw5yIWSVmKq
 i5haGUL6vQPZNYUqy8mmDrd6AicDGXaGpBsiWWzYtMq5jo4Es7J6tq6Vf5WT+Q66fSmH
 dQuQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1679075061;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=221RX4HHxE2jTFSxStPS8TYkzbvxIt7u8SjOUGwQcpU=;
 b=ZdhvW7S/IAg0HXMUfYtUoMlNWDBoGpKiXM3S7umn1h/NiPdPYar1NW/AunegEX3Ojs
 R1xxcDhdXsQjJyqV6zdo8qUXefeFs5y/AfX/JPIlSlZLHkxwHtlphfoJU3UoB4/pJo1i
 +FJLULERT4UEz11DOTfpcIfFBFE7fyOqihbVo3c1EVTzvXyxcMP6NJxZqL03Mey9J+z9
 wMlkwFDk43UazOEUZ/mTc+9LFEFp3qB8S4BBmQ3jskM9BvDgTHKTF0N5zbhHIa7/AARx
 ox2qo7xVsElXINYtLPpQEBonhkI4k3eC7Xc9hC7Hzc++7s+Ib+ANq7ee02T6WeB5eb9+
 WLHA==
X-Gm-Message-State: AO0yUKUp5CelKGNejwIlNspgUb0Ge64JnFiSve0M1VwXGOfoTFHdwNFc
 I7wBciYlgcAsvB2xHbYQaejmT/AM6C8=
X-Google-Smtp-Source: AK7set8CxO6DCpNDNNTB5KUpeF/u9NaQvFj+Wbfa5Mm/bmDQKow4ljxeiWDK19xZGY0IIgndq0K34w==
X-Received: by 2002:a5d:522b:0:b0:2cf:e67c:8245 with SMTP id
 i11-20020a5d522b000000b002cfe67c8245mr7891618wra.44.1679075060589; 
 Fri, 17 Mar 2023 10:44:20 -0700 (PDT)
Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id
 f11-20020a5d4dcb000000b002cfe3f842c8sm2442865wru.56.2023.03.17.10.44.19
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 17 Mar 2023 10:44:20 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
In-Reply-To: <833563e3xc.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 17 Mar
 2023 18:30:23 +0200")
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN> <833563e3xc.fsf@HIDDEN>
Date: Fri, 17 Mar 2023 18:44:19 +0100
Message-ID: <87sfe3s26k.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62237
Cc: sdt@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Fri, 17 Mar 2023 18:30:23 +0200, Eli Zaretskii <eliz@HIDDEN> said:

    >> From: Robert Pluim <rpluim@HIDDEN>
    >> Cc: Sebastian Tennant <sdt@HIDDEN>,  62237 <at> debbugs.gnu.org
    >> Date: Fri, 17 Mar 2023 16:39:19 +0100
    >>=20
    >> For reasons unknown to me, I actually have COLORTERM=3Dtruecolor set=
 in
    >> my environment, which tickles this issue. But the only reason it does
    >> so is because under screen by default I get
    >> TERM=3Dscreen.xterm-256color. If I do
    >>=20
    >> TERM=3Dxterm-256color src/emacs -Q -nw
    >>=20
    >> then I get 24bit colour (according to `display-color-cells')
    >>=20
    >> I guess we could drop the 'screen.' prefix in
    >> `init_display_interactive', although that does feel like a hack.

    Eli> Why not in screen.el?

Because the 24 bit colour detection is done in init_tty. By the time
we get to screen.el it=CA=BCs too late.

    Eli> Is this screen.FOO format documented somewhere in screen's
    Eli> documentation?

Yes:

       When screen tries to figure out a terminal name for  itself,  it  fi=
rst
       looks  for an entry named "screen.<term>", where <term> is the conte=
nts
       of your $TERM variable.  If no such entry exists, screen tries "scre=
en"
       (or  "screen-w"  if  the terminal is wide (132 cols or more)).  If e=
ven
       this entry cannot be found, "vt100" is used as a substitute.

       The idea is that if you have a terminal which doesn't support an imp=
or=E2=80=90
       tant  feature  (e.g.  delete  char or clear to EOS) you can build a =
new
       termcap/terminfo entry for screen (named "screen.<dumbterm>") in  wh=
ich
       this  capability  has been disabled. If this entry is installed on y=
our
       machines you are able to do a rlogin and still keep the  correct  te=
rm=E2=80=90
-->    cap/terminfo  entry.  The terminal name is put in the $TERM variable=
 of
       all new windows.  Screen also sets the $TERMCAP variable reflecting =
the
       capabilities of the virtual terminal emulated. Notice that, however,=
 on
       machines using the terminfo database this variable has no effect.  F=
ur=E2=80=90
       thermore, the variable $WINDOW is set to the window number of each w=
in=E2=80=90
       dow.

Robert
--=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 17 Mar 2023 16:42:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 17 12:42:50 2023
Received: from localhost ([127.0.0.1]:45488 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdDAH-0005eK-Jl
	for submit <at> debbugs.gnu.org; Fri, 17 Mar 2023 12:42:50 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40538)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pdDAG-0005e8-9p
 for 62237 <at> debbugs.gnu.org; Fri, 17 Mar 2023 12:42:48 -0400
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 <eliz@HIDDEN>)
 id 1pdDAA-0006dQ-JB; Fri, 17 Mar 2023 12:42:42 -0400
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=hTDDfKNQP8YeKDLWyuvaiZ12b8+TYCTsBazMJMkNLNo=; b=l6PTr79TAuAV
 P3Xw87P8nGlZd02rMGZGetsqo8z/TNpKl/Tt+hCeHL9FZ46dpsXAWt0hvcpQ5XORZ13abq+fIL8aZ
 Jxb6HOxH/S1UTfbUHjGai3dX3pSt9cRze7rThhxU4IsjYTz4+nZkCIOZ5fyqmIw7/ts96QuhK5JI6
 LWeGZ4ClHjh51SYai3hWbKjuXMBpAWg0ynuY/D6nj+bQqt4Jo1qLN6ZSRv7r1Pux4JWit4WJMdVHw
 JBY/G2ry97BwpUOAg6B/RLUR+8dfAlcz7mDjDYUF4WSjr7fwyGh9FbsVkKzwimDqViSWHuqPcWYJl
 sRT80R4rJQcnP4uOBmh4ZQ==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pdDAA-0007XU-2D; Fri, 17 Mar 2023 12:42:42 -0400
Date: Fri, 17 Mar 2023 18:42:43 +0200
Message-Id: <83zg8bcosc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sebastian Tennant <sdt@HIDDEN>
In-Reply-To: <87y1nv4af0.fsf@HIDDEN> (message from Sebastian Tennant on
 Fri, 17 Mar 2023 16:20:19 +0000)
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87y1nv4af0.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62237
Cc: 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Sebastian Tennant <sdt@HIDDEN>
> Cc: 62237 <at> debbugs.gnu.org
> Date: Fri, 17 Mar 2023 16:20:19 +0000
> 
> > First, if you can build the latest emacs-29 branch of the Emacs Git
> > repository, please try that and tell whether the problem persists or
> > have been solved in the meantime.
> 
> The photos happen to show an Emacs I built from master a couple of
> days ago, i.e. Emacs 30.0.50.  If you'd still like me to test branch
> emacs-29, then let me know and I will happily do so.

No, Emacs 30 is good enough.  (Your report says Emacs 28.1, which is
why I asked.)

>  ** 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".
> 
> This lead me to investigate whether or not COLORTERM was set in my
> environment.  I'm running Debian bullseye and terminfo is installed
> but, nevertheless, GNOME Terminal sets COLORTERM=truecolor by default.

What is TERM set to on that system?

> > Finally, please show the display produced by "M-x
> > list-colors-display" in both cases: when COLORTERM=truecolor is and
> > isn't set.  It is important for us to know how many colors Emacs
> > uses in each situation.
> 
> I've updated the screenshots to show the output of
> #'list-colors-display.  Here are the links again, for your
> convenience.
> 
>  https://download.sebyte.me/misc/truecolor-active.png
>  https://download.sebyte.me/misc/truecolor-inactive.png

This seems to say that your terminal isn't compatible with what Emacs
assumes under COLORTERM=truecolor.  It also says that your terminal
actually supports only 88 colors.  So you should unset COLORTERM in
your environment, or use another terminal emulator (like 256-color
Xterm or some really true-color emulator).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 17 Mar 2023 16:30:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 17 12:30:30 2023
Received: from localhost ([127.0.0.1]:45476 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdCyM-0005Kd-Ew
	for submit <at> debbugs.gnu.org; Fri, 17 Mar 2023 12:30:30 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33660)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pdCyK-0005KG-OU
 for 62237 <at> debbugs.gnu.org; Fri, 17 Mar 2023 12:30:29 -0400
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 <eliz@HIDDEN>)
 id 1pdCyF-0002S4-4v; Fri, 17 Mar 2023 12:30:23 -0400
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=wYSJoYm9PQp1f9yM2Wz1h50WFztqyQIK8WUuCVXfBlU=; b=rSTn6QB5kOUC
 N1IaJ9tXJBeCPq7Nv9lrfFHi63/Uu9zNwDcQQyhplNzuF6bWza3U5ELUEIcXz3U3Ag9G9cC459Nyn
 2Xq1nUHsfR/VC9HMjrW9sM/MqJF8tm7nNkvMmj3+NuczlzJlF4SpQfQSoCtE01oeoOt5WF1qRul7x
 O0Q9vPvDqBWTfMHOwP15b5dvJkLZLPPK7ARv2Mic1/SUmg7pj5d9aUPTd4GMNcdkuFYcuPnv9P2rs
 hjBYfmznKonTIgBW71kECTJq8pKOEONkyiXvTia5McZlk8R2WO4FlG501lXkz7U2UzjOBCEXVxiEw
 /2E4+QTVCl6b6omfcdBD1w==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pdCyE-0001KK-Ia; Fri, 17 Mar 2023 12:30:22 -0400
Date: Fri, 17 Mar 2023 18:30:23 +0200
Message-Id: <833563e3xc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Robert Pluim <rpluim@HIDDEN>
In-Reply-To: <87wn3fs7yw.fsf@HIDDEN> (message from Robert Pluim on Fri, 17
 Mar 2023 16:39:19 +0100)
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
 <87wn3fs7yw.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62237
Cc: sdt@HIDDEN, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: Sebastian Tennant <sdt@HIDDEN>,  62237 <at> debbugs.gnu.org
> Date: Fri, 17 Mar 2023 16:39:19 +0100
> 
> For reasons unknown to me, I actually have COLORTERM=truecolor set in
> my environment, which tickles this issue. But the only reason it does
> so is because under screen by default I get
> TERM=screen.xterm-256color. If I do
> 
> TERM=xterm-256color src/emacs -Q -nw
> 
> then I get 24bit colour (according to `display-color-cells')
> 
> I guess we could drop the 'screen.' prefix in
> `init_display_interactive', although that does feel like a hack.

Why not in screen.el?

Is this screen.FOO format documented somewhere in screen's
documentation?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 17 Mar 2023 16:20:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 17 12:20:29 2023
Received: from localhost ([127.0.0.1]:45454 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdCoe-00052G-Qb
	for submit <at> debbugs.gnu.org; Fri, 17 Mar 2023 12:20:29 -0400
Received: from out2-smtp.messagingengine.com ([66.111.4.26]:57657)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sebyte+return-path@HIDDEN>) id 1pdCoc-00051w-DK
 for 62237 <at> debbugs.gnu.org; Fri, 17 Mar 2023 12:20:26 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.nyi.internal (Postfix) with ESMTP id 586A65C0179;
 Fri, 17 Mar 2023 12:20:21 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Fri, 17 Mar 2023 12:20:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebyte.me; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm2; t=1679070021; x=
 1679156421; bh=pkateinyHAaCtglJhoTtbANxg+iYmFn3uy711JQmm94=; b=s
 w/RAEXGZ4Dmn3S4QabdNCVWjClUtNnjTsHWh2J6CSbTbjRrZK8HDdc1vKUVItgin
 cZIxQDflyYFxFcTiBQb2Qn0p7m8Qhjqlt0AsLk3NuCsOv1Ubc9TSlS7k94C34DFG
 vhaHAR0uNrZjaF5hPOETrYGCG8wG4GcfPFEaylu3Sn7cT01FL0E6bIx8piR9f2Sr
 FZ5eD+BZp8UMdhYhvhoq+Im1wFCN3b4Nfskf84sAWNeYvdZxb6IUXQvu5gqyUP6z
 hOtXNwCptU77Dx8h5ULX/w/a4fkcXOrJZj0peA1DGWCjY3lu/MJkSbBLNxE/foLS
 JnWhAblDji93xwTba2mGQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1679070021; x=
 1679156421; bh=pkateinyHAaCtglJhoTtbANxg+iYmFn3uy711JQmm94=; b=e
 /YemnJKVUMa5Y7Uwrmn60DeHsYDItNBeDa8CDiVHfqGtDVwwp41pfO+RuP7yQeQP
 Pz9Zm0C2RH3aNZkvbirZzPE2C5INglo+Jv1CVG9VUEJeRidq4YTTJYItkIpjZsyD
 Oj9TmO1akuKPQLi7ARijiVQ8u9zd861urTBBb2NcQ9cjwL1NEZOP5fYJhJ11G036
 SiLDW0Vnz6McyXdLRIgZ39kqj8L0oKhI9h9eQG4CT7BTIGO0fV5dd1fn10wCwb18
 rC20a8B/QX1igDidsrMAYvCiMKwUusTUgkivGy7kB17sAt7kFkQwe97J+jpTr29v
 NZ/N6xvVrkLptliHBrkTg==
X-ME-Sender: <xms:RZMUZL0Wx3fV3wJlldNe6MJV37jts2j3CQzQLRr9CjMjFaiVKYyyww>
 <xme:RZMUZKGYZAIZtMdsACX0OScGHaUBC7nmIyak20cQSFdnJDaq6pN55ZUbNHBclyeXs
 DZwx5SBQHhgy_0NTw>
X-ME-Received: <xmr:RZMUZL76wa-BXGLfBtDqt7mPk-yrqHYf6GPNAwAqVQdNSAOLrKAG_6aoT-qCD9w2-RGScAs>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefvddgkeehucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvvefufhgffffkgggtgfesthhqredttderjeenucfhrhhomhepufgvsggr
 shhtihgrnhcuvfgvnhhnrghnthcuoehsughtsehsvggshihtvgdrmhgvqeenucggtffrrg
 htthgvrhhnpefgffehieeitdduhfeiveejiefhteeivdeutedtfeethfeviedvheduhfei
 geegteenucffohhmrghinhepshgvsgihthgvrdhmvgenucevlhhushhtvghrufhiiigvpe
 dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvggshihtvgdorhgvthhurhhnqdhprght
 hhesfhgrshhtmhgrihhlrdgtohhm
X-ME-Proxy: <xmx:RZMUZA3j6Uzf6tgaVrDFzpGpAcbXBRPLXSPYArFp1wICYsZw8pCCRw>
 <xmx:RZMUZOEe07Pf1EXhW8vfQs3c_nDlalbrWjuC5AYnpBFuBSa0wj2l-g>
 <xmx:RZMUZB_o9FStWvKdR9NSUyzf8VJB1EACIx6fXwL2OLdAQjJaOuBkWg>
 <xmx:RZMUZJNxgIrMatahj2EIkGS9wN2cHZKyNjfUQvMUoFzB12f0zQJRwg>
Feedback-ID: i9e78401f:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 17 Mar 2023 12:20:21 -0400 (EDT)
Received: from sebyte by balor with local (Exim 4.94.2)
 (envelope-from <sebyte@HIDDEN>)
 id 1pdCoV-001w3s-VZ; Fri, 17 Mar 2023 16:20:19 +0000
From: Sebastian Tennant <sdt@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)
Date: Fri, 17 Mar 2023 16:20:19 +0000
Message-ID: <87y1nv4af0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 62237
Cc: 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

Hello Eli,

Thanks for your prompt response.

Quoth Eli Zaretskii <eliz@HIDDEN>
on Fri, 17 Mar 2023 14:15:34 +0200:
>> From: Sebastian Tennant <sdt@HIDDEN>
>> Date: Fri, 17 Mar 2023 09:41:36 +0000
>>
>> Summary: Support for 24-bit true colour, added in Emacs 28.1, breaks
>>          colours in Emacsen built without X support and running under
>>          GNU Screen (v4.08.00).
>> [=E2=80=A6]
>
> Thanks for the report, but it lacks several crucial details for us
> to investigate the problem.
>
> First, if you can build the latest emacs-29 branch of the Emacs Git
> repository, please try that and tell whether the problem persists or
> have been solved in the meantime.

The photos happen to show an Emacs I built from master a couple of
days ago, i.e. Emacs 30.0.50.  If you'd still like me to test branch
emacs-29, then let me know and I will happily do so.

> [=E2=80=A6]
>
> [T]he user should _only_ set it if the text-mode terminal actually
> supports true color using the commands Emacs expects to work in that
> case, but Emacs cannot detect that without COLORTERM=3Dtruecolor being
> set.  Is that your case?

Nope.  Let me explain.

I've been unable to move beyond 27.2 (on my laptops) for over a year
because of these broken colors.  I didn't file a bug report sooner
because I had no idea what the cause of the prolem was.

Yesterday, I read this entry in etc/NEWS.28:

 ** 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=3Dtruecolor' in the environment.  This is
 useful on systems such as FreeBSD which ships only with "etc/termcap".

This lead me to investigate whether or not COLORTERM was set in my
environment.  I'm running Debian bullseye and terminfo is installed
but, nevertheless, GNOME Terminal sets COLORTERM=3Dtruecolor by default.
I discovered that if I unset COLORTERM, colors start working again!
(In Emacsen I've built without X, running in a screen).

To be clear, the colors are only broken in Emacsen running in a
screen.  Outside of screen, the colors are fine.

> Finally, please show the display produced by "M-x
> list-colors-display" in both cases: when COLORTERM=3Dtruecolor is and
> isn't set.  It is important for us to know how many colors Emacs
> uses in each situation.

I've updated the screenshots to show the output of
#'list-colors-display.  Here are the links again, for your
convenience.

 https://download.sebyte.me/misc/truecolor-active.png
 https://download.sebyte.me/misc/truecolor-inactive.png

Seb




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 17 Mar 2023 15:39:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 17 11:39:28 2023
Received: from localhost ([127.0.0.1]:45415 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pdCAy-0003xC-D8
	for submit <at> debbugs.gnu.org; Fri, 17 Mar 2023 11:39:28 -0400
Received: from mail-wr1-f46.google.com ([209.85.221.46]:36676)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1pdCAw-0003wx-Ph
 for 62237 <at> debbugs.gnu.org; Fri, 17 Mar 2023 11:39:27 -0400
Received: by mail-wr1-f46.google.com with SMTP id i9so4835742wrp.3
 for <62237 <at> debbugs.gnu.org>; Fri, 17 Mar 2023 08:39:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20210112; t=1679067560;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=6XwmV4kqoxYP9Yh/0eRgeIxPOKTN9PS8fuiTKWOisUY=;
 b=F+glnYsL3zWfRrzgAlp0JL4hO4TwBPdtiYfLkqJiD2AgieyGEoEuO2poPvh+2s7+J7
 E/X7ClekcczgtPXfchi1JIIxYUhs1CjM+ytv6pc1v7jLJxxvMT0D5md4LUuKi+lCtxYw
 zb/dbg2uDMZMjZTZl0gWPKQHHjNyugSoF2sl9BQPZ/BQzaSXU1xFpXndEFZ335a+NA/1
 83yuQLwcq47xpVUpjDIKSmyYw+2xZOfXSFCttOvpiGpAp7M9fTuns5L1gUbbKhRkMdUm
 87jR9PjpuAbdvCVDtdyb/Jq/4OKbRffwivqe+pDKrbpqjczIwCZ+vxsruU9dhYr3Zf3p
 G+bA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1679067560;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=6XwmV4kqoxYP9Yh/0eRgeIxPOKTN9PS8fuiTKWOisUY=;
 b=J4Nky3Snkp1UvJ0cqK+urAMTVBmvaInEA/+Bb9+X7dkmBsk7bninOW8HlHx50oguYN
 vLdG6gpX8uGDpjLFPzgK0YWsfhyVNld8wfnTYJ01uBEPAEbc3KkiEwnlyErLHdAP0LxN
 DP5kjUDCxkqdSXGsNjPAZzwAUnmvJLyfrU+gy2uO7zXCcniUDRZaRvr4YMPBEBKHpPXR
 Ohgx2vo8YFzzglulaQkd3XWD8iTA5lG2cQQTskEHyPRbHmvfJCtBsy/lNpEKclI4Doro
 kCmK/OGBoviSpav1BX8ny1cC7ukTuvDqo/Y74yDS/1G7InDm6NUKDNVo63Qn5WmlQpfr
 OJ2w==
X-Gm-Message-State: AO0yUKUU0vl9e6DGctDIVhiMKLwVAVJkaXuQml1LvfMoOZkErO6GdezI
 4hhQbezvyVWs7ShxykLnqfAKczWCsiU=
X-Google-Smtp-Source: AK7set9evp+ggwnl6pJy0n13jJEgpMrPF8fFQvs2AOKJldFWuV6KZvg1JgxZD+4sUgQPq2aKLYGBmQ==
X-Received: by 2002:adf:ec04:0:b0:2d3:b899:8a64 with SMTP id
 x4-20020adfec04000000b002d3b8998a64mr1415623wrn.55.1679067560255; 
 Fri, 17 Mar 2023 08:39:20 -0700 (PDT)
Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id
 r10-20020a5d4e4a000000b002cf1c435afcsm2230680wrt.11.2023.03.17.08.39.19
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 17 Mar 2023 08:39:19 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
In-Reply-To: <83h6ujefq1.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 17 Mar
 2023 14:15:34 +0200")
References: <87sfe390kv.fsf@HIDDEN> <83h6ujefq1.fsf@HIDDEN>
Date: Fri, 17 Mar 2023 16:39:19 +0100
Message-ID: <87wn3fs7yw.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 62237
Cc: Sebastian Tennant <sdt@HIDDEN>, 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Fri, 17 Mar 2023 14:15:34 +0200, Eli Zaretskii <eliz@HIDDEN> said:
    Eli> If the problem persists in Emacs 29, then please tell why you need to
    Eli> use COLORTERM=truecolor at all.  Emacs uses that as fallback, in case
    Eli> all the other known methods of specifying true color via terminfo
    Eli> didn't work.  This fallback relies on an assumption regarding the
    Eli> commands to send to the terminal to turn on and off the colors, see
    Eli> the file term.c in the Emacs source tree around line 4160.  The other
    Eli> known methods of specifying support for true color use
    Eli> 'setf24'/'setb24' capabilities, or the 'RGB' flag is set by terminfo.

    Eli> So setting COLORTERM=truecolor is the responsibility of the user: the
    Eli> user should _only_ set it if the text-mode terminal actually supports
    Eli> true color using the commands Emacs expects to work in that case, but
    Eli> Emacs cannot detect that without COLORTERM=truecolor being set.  Is
    Eli> that your case?

    Eli> Finally, please show the display produced by "M-x list-colors-display"
    Eli> in both cases: when COLORTERM=truecolor is and isn't set.  It is
    Eli> important for us to know how many colors Emacs uses in each situation.

For reasons unknown to me, I actually have COLORTERM=truecolor set in
my environment, which tickles this issue. But the only reason it does
so is because under screen by default I get
TERM=screen.xterm-256color. If I do

TERM=xterm-256color src/emacs -Q -nw

then I get 24bit colour (according to `display-color-cells')

I guess we could drop the 'screen.' prefix in
`init_display_interactive', although that does feel like a hack.

Robert
-- 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at 62237 <at> debbugs.gnu.org:


Received: (at 62237) by debbugs.gnu.org; 17 Mar 2023 12:15:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 17 08:15:41 2023
Received: from localhost ([127.0.0.1]:43891 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pd8zl-0001Hz-Fe
	for submit <at> debbugs.gnu.org; Fri, 17 Mar 2023 08:15:41 -0400
Received: from eggs.gnu.org ([209.51.188.92]:38126)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pd8zk-00012s-JF
 for 62237 <at> debbugs.gnu.org; Fri, 17 Mar 2023 08:15:41 -0400
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 <eliz@HIDDEN>)
 id 1pd8zf-00089O-0V; Fri, 17 Mar 2023 08:15:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=SW3bGwPYRAJ9GsauytuOZd+/2XnG0ymjWtalPSKlPz8=; b=mjp5sj3O+Z85c9M6UH87
 mBMP7LWmvC7fk/iqJsqDT1ZxsSKdWgMT+ac7xFU2dX4K+qrM6X+o78qefwjm+2ZfnXZd2jdxf8jOm
 Xuhr2HN/GSvAIbvU4vnJRHnvuJVS0/7+rl/zuMn2rHiYIvY+YCmLRj2U5QrLSjqH0P7PBFip+CQ6k
 caTTJzZwUEemMutkH8BeappNt8XkQ3OqSkBZF6alNSRih4azLVutGdyyv/L72X/Rk4C2Sk37EgnW0
 gHVyXWDBaTqAV6gA9o0Ji2p5baUGyESJptTvUuNjxdqBEH+GBLqvz3mb+r8pXJgrax2hfj8I4p6rl
 GuU+Od0VJLTb0w==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1pd8zd-0005BJ-Ff; Fri, 17 Mar 2023 08:15:34 -0400
Date: Fri, 17 Mar 2023 14:15:34 +0200
Message-Id: <83h6ujefq1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sebastian Tennant <sdt@HIDDEN>
In-Reply-To: <87sfe390kv.fsf@HIDDEN> (message from Sebastian Tennant on
 Fri, 17 Mar 2023 09:41:36 +0000)
Subject: Re: bug#62237: 28.1 or higher: 24-bit true color breaks colours in
 Emacsen built without X under GNU Screen
References: <87sfe390kv.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 62237
Cc: 62237 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Sebastian Tennant <sdt@HIDDEN>
> Date: Fri, 17 Mar 2023 09:41:36 +0000
> 
> Summary: Support for 24-bit true colour, added in Emacs 28.1, breaks
>          colours in Emacsen built without X support and running under
>          GNU Screen (v4.08.00).
> 
> Steps to reproduce:
> 
>  1. Build Emacs >= 28.1 without X support.  The two configurations I have
>     tested are below:
> 
>      ./configure\                          ./configure\
>        --prefix=[…]\                          --prefix=[…]\
>        --enable-check-lisp-object-type\       --enable-check-lisp-object-type\
>        --disable-acl\                         --disable-acl\
>        --without-dbus\                        --without-all\
>        --without-gconf\                       --without-x\
>        --without-gif\                         --with-file-notification=yes\
>        --without-gsettings\                   --with-gnutls\
>        --without-jpeg\                        --with-gpm\
>        --without-modules\                     --with-json\
>        --without-png\                         --with-mailutils\
>        --without-rsvg\                        --with-modules\
>        --without-selinux\                     --with-native-compilation\
>        --without-sound\                       --with-libsystemd\
>        --without-tiff\                        --with-small-ja-dic\
>        --without-x\                           --with-sqlite3\
>        --without-xpm\                         --with-threads\
>                                               --with-xml2\
>                                               --with-zlib\
> 
>  2. Launch a terminal program (e.g. GNOME Terminal) and run GNU Screen
>     (bypassing any .screenrc):
> 
>      $ touch foo
>      $ screen -c foo
> 
>  3. Run Emacs with 24-bit true colour active and observe the broken colours:
> 
>      $ COLORTERM=truecolor ./src/emacs -Q
> 
>     Screenshot: https://download.sebyte.me/misc/truecolor-active.png
> 
>  4. Run Emacs with 24-bit true colour inactive and observe the correct colours:
> 
>      $ COLORTERM= ./src/emacs -Q
> 
>     Screenshot: https://download.sebyte.me/misc/truecolor-inactive.png

Thanks for the report, but it lacks several crucial details for us to
investigate the problem.

First, if you can build the latest emacs-29 branch of the Emacs Git
repository, please try that and tell whether the problem persists or
have been solved in the meantime.

If the problem persists in Emacs 29, then please tell why you need to
use COLORTERM=truecolor at all.  Emacs uses that as fallback, in case
all the other known methods of specifying true color via terminfo
didn't work.  This fallback relies on an assumption regarding the
commands to send to the terminal to turn on and off the colors, see
the file term.c in the Emacs source tree around line 4160.  The other
known methods of specifying support for true color use
'setf24'/'setb24' capabilities, or the 'RGB' flag is set by terminfo.

So setting COLORTERM=truecolor is the responsibility of the user: the
user should _only_ set it if the text-mode terminal actually supports
true color using the commands Emacs expects to work in that case, but
Emacs cannot detect that without COLORTERM=truecolor being set.  Is
that your case?

Finally, please show the display produced by "M-x list-colors-display"
in both cases: when COLORTERM=truecolor is and isn't set.  It is
important for us to know how many colors Emacs uses in each situation.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Mar 2023 09:41:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 17 05:41:48 2023
Received: from localhost ([127.0.0.1]:43686 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pd6ap-0001FT-Lc
	for submit <at> debbugs.gnu.org; Fri, 17 Mar 2023 05:41:47 -0400
Received: from lists.gnu.org ([209.51.188.17]:33236)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sebyte+return-path@HIDDEN>) id 1pd6an-0001FK-Jg
 for submit <at> debbugs.gnu.org; Fri, 17 Mar 2023 05:41:45 -0400
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 <sebyte+return-path@HIDDEN>)
 id 1pd6an-0002Gt-Ae
 for bug-gnu-emacs@HIDDEN; Fri, 17 Mar 2023 05:41:45 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <sebyte+return-path@HIDDEN>)
 id 1pd6ak-0008KX-Vo
 for bug-gnu-emacs@HIDDEN; Fri, 17 Mar 2023 05:41:45 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.nyi.internal (Postfix) with ESMTP id C48B45C0125;
 Fri, 17 Mar 2023 05:41:40 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Fri, 17 Mar 2023 05:41:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebyte.me; h=cc
 :content-transfer-encoding:content-type:content-type:date:date
 :from:from:in-reply-to:message-id:mime-version:reply-to:sender
 :subject:subject:to:to; s=fm2; t=1679046100; x=1679132500; bh=/G
 Ev0IErYjNmhuWWwilJFvZGLE6KwTaJuIlo/vQfCeo=; b=SPYMJanjOQzRcDii84
 5upoGdu9d+ai4aeF34noPqC646FZSHekNP63bKp1fiqCtSNQKftTN+VhRHpddvjG
 QMRD6JwhtVH9xYdUw6X5VABd2emZAEtqNjYEvFdRcRWbgMmwR8yEBWm+ZQt2dSvE
 dVVm1GbjH6aoGDL/K2+fIEXf7XPwTj3xqEaVXuLX/aj6W/GJdNMt1k74vjACRjS2
 P15Kzbikx49XCvkCKe9DK2XPldbPaTxmMaC7lCCrtxARXzxRBIN3SUM7RE+PhwJn
 eqe7cRwS8woUGJUIacphv1gDyWlC+GginJFsRxvNvD+Bu3WOphhEpoJCXd1ydJOp
 gOzw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:message-id:mime-version:reply-to:sender:subject
 :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm2; t=1679046100; x=1679132500; bh=/GEv0IErYjNmh
 uWWwilJFvZGLE6KwTaJuIlo/vQfCeo=; b=sI+l4OeyJi2/Of+WbEtwIclCYMKyN
 kV9InkKrQaQqtnAfgUsZqBY0s+LC5VJpftbC5xlrysAwjfZIAZXX7YmVtOQGvUU8
 ztqjD6DZImjhsxcgchoriyIxKK++RleEPuNytjjlGxt3vOeJpQlqDyytJqG6e0NB
 F34NuEtcVjo18RMooygC/E7M2T7eXrZg21fvF5qXn1U10xfUgPMtKQsIC0CyzK6h
 MYO+KwNlsTS/AXYOWOx/v/lyevBpIvp5KrFcPSHcmFSLjnwTMUPfZljIbrVfBD77
 5l+dgqj0/ZmoaS2dafg99tEDYsi8gYA29KtT7q+Ov3lQy7EBh4WxLDy/w==
X-ME-Sender: <xms:1DUUZI6uwdIN2KVPC5KyfB1O6JzD8BgcpwN9kIAiCrnnDcGTYNyRaA>
 <xme:1DUUZJ4CKRZT5JVCrW05RxYEA2Geu4xlgErUnJuQgr4XX7KXFelwv83gpnLiF3Dz1
 jBBZwxezFTA78QJYg>
X-ME-Received: <xmr:1DUUZHdp2KzW6QjWOaa8MNglWFeN_oGT0kDTNSCrfaNICD6CFT2EGib4ZZd3Q4QPKQwSsnI_iiESbnLKVgY>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefvddgtdeiucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtgfesthhqredttd
 dtjeenucfhrhhomhepufgvsggrshhtihgrnhcuvfgvnhhnrghnthcuoehsughtsehsvggs
 hihtvgdrmhgvqeenucggtffrrghtthgvrhhnpeekudekffejgeekueelieelffehiedtud
 eugfetjeehuefhteegveffkedtleevjeenucffohhmrghinhepshgvsgihthgvrdhmvgen
 ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsvggshi
 htvgdorhgvthhurhhnqdhprghthhesfhgrshhtmhgrihhlrdgtohhm
X-ME-Proxy: <xmx:1DUUZNI9fbfp-m07hte5IL2jhqsu8yalXN7Tp7qshSw0eMdIiUIzZA>
 <xmx:1DUUZMLCufsmivek6rE7XA16dcBGBIOD7G922V3_t3trKm6kGErcuw>
 <xmx:1DUUZOzU0FrOcGLrviO0cpuVtqpP_ez_0rJuCDCJHtLJaqrxtaG79A>
 <xmx:1DUUZDmrg0YeyUBBU9qAwGUVXT6j5TdiESB-Tlz41PHJ-b482b8U2A>
Feedback-ID: i9e78401f:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <bug-gnu-emacs@HIDDEN>; Fri, 17 Mar 2023 05:41:40 -0400 (EDT)
Received: from sebyte by scaffold with local (Exim 4.94.2)
 (envelope-from <sdt@HIDDEN>) id 1pd6ae-0005fy-LV
 for bug-gnu-emacs@HIDDEN; Fri, 17 Mar 2023 09:41:36 +0000
From: Sebastian Tennant <sdt@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.1 or higher: 24-bit true color breaks colours in Emacsen built
 without X under GNU Screen
Date: Fri, 17 Mar 2023 09:41:36 +0000
Message-ID: <87sfe390kv.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=66.111.4.25;
 envelope-from=sebyte+return-path@HIDDEN;
 helo=out1-smtp.messagingengine.com
X-Spam_score_int: -21
X-Spam_score: -2.2
X-Spam_bar: --
X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25,
 FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

Hello there,

Summary: Support for 24-bit true colour, added in Emacs 28.1, breaks
         colours in Emacsen built without X support and running under
         GNU Screen (v4.08.00).

Steps to reproduce:

 1. Build Emacs >=3D 28.1 without X support.  The two configurations I have
    tested are below:

     ./configure\                          ./configure\
       --prefix=3D[=E2=80=A6]\                          --prefix=3D[=E2=80=
=A6]\
       --enable-check-lisp-object-type\       --enable-check-lisp-object-ty=
pe\
       --disable-acl\                         --disable-acl\
       --without-dbus\                        --without-all\
       --without-gconf\                       --without-x\
       --without-gif\                         --with-file-notification=3Dye=
s\
       --without-gsettings\                   --with-gnutls\
       --without-jpeg\                        --with-gpm\
       --without-modules\                     --with-json\
       --without-png\                         --with-mailutils\
       --without-rsvg\                        --with-modules\
       --without-selinux\                     --with-native-compilation\
       --without-sound\                       --with-libsystemd\
       --without-tiff\                        --with-small-ja-dic\
       --without-x\                           --with-sqlite3\
       --without-xpm\                         --with-threads\
                                              --with-xml2\
                                              --with-zlib\

 2. Launch a terminal program (e.g. GNOME Terminal) and run GNU Screen
    (bypassing any .screenrc):

     $ touch foo
     $ screen -c foo

 3. Run Emacs with 24-bit true colour active and observe the broken colours:

     $ COLORTERM=3Dtruecolor ./src/emacs -Q

    Screenshot: https://download.sebyte.me/misc/truecolor-active.png

 4. Run Emacs with 24-bit true colour inactive and observe the correct colo=
urs:

     $ COLORTERM=3D ./src/emacs -Q

    Screenshot: https://download.sebyte.me/misc/truecolor-inactive.png




Acknowledgement sent to Sebastian Tennant <sdt@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#62237; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 20 Mar 2023 14:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.