From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Multi-tty Date: Thu, 07 Nov 2024 12:58:33 +0200 Message-ID: <8634k3qpie.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16219"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 07 11:59:33 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t90Ef-00045N-4A for ged-emacs-devel@m.gmane-mx.org; Thu, 07 Nov 2024 11:59:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t90Dp-0000RC-Q2; Thu, 07 Nov 2024 05:58:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t90Dk-0000Qx-Me for emacs-devel@gnu.org; Thu, 07 Nov 2024 05:58:37 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t90Dk-0008Tu-E9; Thu, 07 Nov 2024 05:58:36 -0500 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=ub9+YARv9nC+7wrRUi3hWoMm7Mh1J/q2smuePhU0dE8=; b=M62tsOAABDxf3EbH7Zw9 Kd588WnVW8WXk65W7Wtb4/K3FI+t8p+hlxb02qPQtfisb2/rWeitNvlqxbIuSXcVzsRMwgOXOAk8u veC2W4NysactWqdfLPkWTHHtnQcLc0eYUGM7EUSSYt/q05cFfbJmapqNEB8HOf8wY3nRlxZMfYS/o i1kGlyJu7EGag3CMIH2Uh7mdHX7af6EE/mwA6uc3xtjU8m2e1kdiIsrcBbUzW4aPF3o2vWl4ZVtaH hNRsKybAiPxXmKF/CH0YTQMTY7HZDxzaFPYl8WDoIdIVBG6gFKfMeKvbQlp4MHH1U173nRQs29D7X XcZtjzvFmRf8wA==; In-Reply-To: (message from Gerd =?utf-8?Q?M?= =?utf-8?Q?=C3=B6llmann?= on Thu, 07 Nov 2024 10:53:09 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325218 Archived-At: > From: Gerd Möllmann > Date: Thu, 07 Nov 2024 10:53:09 +0100 > > I was playing with multi-tty today, and I encountered strange behavior. > For example, using 2 terminals that have different capabilties, say > different TERM and/or COLORTERM, does not really work. > > (Informal example: I start an emacs server -nw in iTerm > (TERM=xterm-256color, COLORTERM=truecolor), then emacsclient --tty in a > Terminal window (TERM=xterm, COLORTERM not set) => The Emacs frame in > the Terminal window is obviously confused about the terminal's > color capabilties.) > > Is something like that worth writing a bug report? Or maybe it's already > known, although I can't find anything in Debbugs? This is simply not supported, never was. The environment variables are not per-terminal, so their effect is global, and the way we process them (and have no other way) is that the environment variables override what terminfo tells us. We support these environment variables only as poor-man's terminfo, for when terminfo doesn't tell us the whole truth, or the user "wants more". So what you should do is not set any such environment variables at all, and let Emacs deduce the terminal capabilities from the name of the terminal.