From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Multi-tty Date: Fri, 08 Nov 2024 09:18:05 +0100 Message-ID: References: <8634k3qpie.fsf@gnu.org> <87r07nl2gf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21796"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 08 09:19:51 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 1t9KDe-0005Vq-UY for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Nov 2024 09:19:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9KCO-0000wU-PH; Fri, 08 Nov 2024 03:18:33 -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 1t9KC4-0000b4-Cn for emacs-devel@gnu.org; Fri, 08 Nov 2024 03:18:12 -0500 Original-Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t9KC2-0005mb-Mz; Fri, 08 Nov 2024 03:18:12 -0500 Original-Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2fb4af0b6beso30130281fa.3; Fri, 08 Nov 2024 00:18:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731053888; x=1731658688; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cSrmH+BNDmmEqQOgfoJgi/iphfIyXv6tQPdT8buzcjk=; b=CAcNVaczwtidB57CEOT8MUwQ6Ad99cHA0xbQvxtDtY+mBkQCUIQAeTGiD7UxXRLVwQ 6YWt3TBo8vp4/XiRGLS66JUQHHYTnXHo7bVTX/9t6suN6m8FKeI/8EVDqJWOKHnzRKUo DBJhF2IvVxoCxIrySZb8KeJXuDZNNItc6h1gtZUC71G9bljNgWi6cCVEbc8iG2fIr15s rRbjhUmHQwfnNH3tUjh3pD4IXsfXgduUgbG+2whocJc8EiYvR0+V0QBW8lCAE6aONttS fB8XbHpJ6jscNfGsbrmHtUN3KFL58gWHw1JGkaK6YMm/u//Lyo6rSZVlHcqfHdo71Dbp aISQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731053888; x=1731658688; h=content-transfer-encoding:mime-version:user-agent: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=cSrmH+BNDmmEqQOgfoJgi/iphfIyXv6tQPdT8buzcjk=; b=YzDitgv+r5YCqWFog7HSVSo/d7GnAOcKMMgmBibdwuYFHOK1aYkUPTv4kNBraVmy/c Wv62mvTjBwJqOQ/0cyOQoUVYz5ZCZ5LWnuEjdbvbxWLrP90r9N4fTQddEHEU9k2dZisY 5gCNwwBbza97q6W1sTAafYLmmXtuLZPRqjIGWNF6Eqovfiirw2meHc+zun4/sM6/73yk Wu2yr7tWUXls3qjvus9xDxGWOcFUDuL9jre8uvwQs48X95KQ3BQ9K3ejC17Kal7BmVTB v6E2seFh/n8WvXAwqMbRCSdCCvkeVLkTZtIc+lkiDr605tb+SaGw5fo/DO3tEPuXTt0T 1zcA== X-Forwarded-Encrypted: i=1; AJvYcCVIytaU1j5NVWMaIauejhb5rdETAmB1euO4q0ZVVVCZ7nUjZkCUH6MlxJSYYG5k3777QiFy/dOgQQtpvw==@gnu.org X-Gm-Message-State: AOJu0Yw4T5h+DboHkO2EWMyMm8P4VxFQzgnlmKST+7pyZpMniASzItcF YGBI3IVpGlEWsmSUwWlYEfO7YR+2z8RlU8ZMM/5/4rBAiB/PJN6jsHs6Aw== X-Google-Smtp-Source: AGHT+IEmvf1CJHki0kKIDDc38ePvsBCkjzbnDkg4fm180HMySiXf/omjGR2BnVlscyXPtGFEaRCejg== X-Received: by 2002:a05:651c:1143:b0:2fb:8c9a:fe3f with SMTP id 38308e7fff4ca-2ff2020794bmr19018091fa.22.1731053887277; Fri, 08 Nov 2024 00:18:07 -0800 (PST) Original-Received: from pro2 (pd9e36fc2.dip0.t-ipconnect.de. [217.227.111.194]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432b05305a4sm54708835e9.5.2024.11.08.00.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 00:18:06 -0800 (PST) In-Reply-To: <87r07nl2gf.fsf@gmail.com> (Robert Pluim's message of "Thu, 07 Nov 2024 12:15:28 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=gerd.moellmann@gmail.com; helo=mail-lj1-x236.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:325258 Archived-At: Robert Pluim writes: >>>>>> On Thu, 07 Nov 2024 12:58:33 +0200, Eli Zaretskii sai= d: > > >> From: Gerd M=C3=B6llmann > >> Date: Thu, 07 Nov 2024 10:53:09 +0100 > >>=20 > >> I was playing with multi-tty today, and I encountered strange beha= vior. > >> For example, using 2 terminals that have different capabilties, say > >> different TERM and/or COLORTERM, does not really work. > >>=20 > >> (Informal example: I start an emacs server -nw in iTerm > >> (TERM=3Dxterm-256color, COLORTERM=3Dtruecolor), then emacsclient -= -tty in a > >> Terminal window (TERM=3Dxterm, COLORTERM not set) =3D> The Emacs f= rame in > >> the Terminal window is obviously confused about the terminal's > >> color capabilties.) > >>=20 > >> Is something like that worth writing a bug report? Or maybe it's a= lready > >> known, although I can't find anything in Debbugs? > > Eli> This is simply not supported, never was. The environment variab= les > Eli> are not per-terminal, so their effect is global, and the way we > Eli> process them (and have no other way) is that the environment var= iables > Eli> override what terminfo tells us. > > They do, but then they change the settings in the per-terminal > tty_display_info, no? Or am I misreading init_tty? Certainly > > TERM=3Dxterm-mono emacsclient -tty > > gives me a mono emacs. And TERN works because emacsclient picks it up and sends its value as part of the frame creation command to the server. In the server, it is then passed down to make_terminal_frame as a frame parameter which itself uses it for init_tty. A pretty easy fix would be to make the environment that we got from emacsclient anyway another frame parameter. Then init_tty wouldn't have to use getenv to get the value of COLORTERM. I think I'll create a bug for that.