emacs-devel
[Top][All Lists]
Advanced

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

Re: Can emacsclient send environment variables even if it doesn't create


From: Eli Zaretskii
Subject: Re: Can emacsclient send environment variables even if it doesn't create a frame?
Date: Sat, 01 Apr 2023 18:40:31 +0300

> From: Yoichi Nakayama <yoichi.nakayama@gmail.com>
> Date: Sat, 1 Apr 2023 23:54:05 +0900
> Cc: emacs-devel@gnu.org
> 
> > That's because we currently refrain from changing the 'environment'
> > frame parameter -- we tried at some point, and it caused problems we
> > decided to defer to later.  But it is still an option to do that at
> > some point, and so I don't want to block that possibility for trhe
> > benefit of this use case.
> 
> I understand the situation.
> However, I would like there to be a way to propagate the client's
> environment variables without updating the frame's environment.
> Because users of emacsclient don't necessarily want to affect the
> entire frame. The server-buffer-clients element has a 1:1
> correspondence with clients, so I think it makes sense to always
> store client information there. I find it strange that the
> server-buffer-clients element doesn't have environment variables
> when we don't create a frame.

We could perhaps add a new feature, whereby a single environment
variable, or an explicit list of several variables, are passed to the
server and stored in some special variable or a property of the client
process.  But doing this implicitly for the entire environment is
dangerous, unless this is per frame, because if we do this even when a
new frame is not created, the environment variables of the later
client will override those of the former in the 'environment' frame
parameter.  (Your testing indicates that it doesn't, but only because
we currently put the environment into the frame's parameters when we
create a frame.  However, keeping the environment in the process's
property and letting applications access them via the property is not
something I'd like to encourage.)



reply via email to

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