unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thibault Polge <thibault@thb.lt>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 47806@debbugs.gnu.org
Subject: bug#47806: 28.0.50; `make-frame` frame should probably clone the `environment` parameter into the new frame
Date: Thu, 15 Apr 2021 21:47:01 +0200	[thread overview]
Message-ID: <877dl3ib4a.fsf@thb.lt> (raw)
In-Reply-To: <838s5jxt55.fsf@gnu.org>

> Doesn't the 'display' parameter fit the bill?

Not on Wayland, I'm afraid.  I believe all the XWayland instances will
have the same value for `display`, which may be a non-usable value.  I'm
also not sure that we can go from `display` to the Wayland server.  (As
an example, in my case, what I actually need is `SWAYSOCK`).

> How do we know whether a particular frame should or shouldn't have the
> 'environment' frame parameter?  When the frame is created by the
> server on behalf of a client, we know.  But for a random
> frame-creation function, how do we know?

That's a tricky question.  In my understanding, it makes sense in an
ancestor/child relationship: if the ancestor of FRAME has some distinct
set of environment variables, we copy them to the new frame.  I'm not
too clear on the various execution contexts of Emacs Lisp, but couldn't
something similar to:

(when (called-interactively-p) ; I assume this implies there's a frame
                               ; this is being called "from".
  (set-frame-property TARGET 'environment
                      (frame-property SOURCE 'environment')))

To clarify all my assumptions, I understand that the `environment`
property exists because frames of the same daemon or server can appear
in very different environments, like multiple X or Wayland servers,
terminals, remote sessions, and so on. If my understanding is correct,
it makes sense that further frames share these values, even when not
created directly from `emacsclient`.

Best regards,
Thibault





  reply	other threads:[~2021-04-15 19:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15 18:28 bug#47806: 28.0.50; `make-frame` frame should probably clone the `environment` parameter into the new frame Thibault Polge
2021-04-15 19:08 ` Eli Zaretskii
2021-04-15 19:47   ` Thibault Polge [this message]
2021-04-15 19:54     ` Eli Zaretskii
2021-04-15 22:27       ` Thibault Polge
2021-04-16  6:05         ` Eli Zaretskii
2022-06-29 11:10         ` Lars Ingebrigtsen
2022-06-29 11:15           ` Thibault Polge
2022-06-29 11:29             ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=877dl3ib4a.fsf@thb.lt \
    --to=thibault@thb.lt \
    --cc=47806@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).