emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-tty


From: Gerd Möllmann
Subject: Re: Multi-tty
Date: Fri, 08 Nov 2024 09:18:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Robert Pluim <rpluim@gmail.com> writes:

>>>>>> On Thu, 07 Nov 2024 12:58:33 +0200, Eli Zaretskii <eliz@gnu.org> said:
>
>     >> From: Gerd Möllmann <gerd.moellmann@gmail.com>
>     >> 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?
>
>     Eli> This is simply not supported, never was.  The environment variables
>     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 
> variables
>     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=xterm-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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]