all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Yoichi Nakayama <yoichi.nakayama@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Can emacsclient send environment variables even if it doesn't create a frame?
Date: Sat, 01 Apr 2023 18:40:31 +0300	[thread overview]
Message-ID: <83mt3ry5jk.fsf@gnu.org> (raw)
In-Reply-To: <CAF5D8-u=gN+8gDH48fZufmygObZJ4kGT7YBw2+a60oAXffRhhA@mail.gmail.com> (message from Yoichi Nakayama on Sat, 1 Apr 2023 23:54:05 +0900)

> 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	other threads:[~2023-04-01 15:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 13:45 Can emacsclient send environment variables even if it doesn't create a frame? Yoichi Nakayama
2023-03-29 15:46 ` Eli Zaretskii
2023-04-01 13:37   ` Yoichi Nakayama
2023-04-01 13:54     ` Eli Zaretskii
2023-04-01 14:28       ` Yoichi Nakayama
2023-04-01 15:10         ` Eli Zaretskii
2023-04-01 14:54       ` Yoichi Nakayama
2023-04-01 15:40         ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83mt3ry5jk.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=yoichi.nakayama@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.