emacs-devel
[Top][All Lists]
Advanced

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

Re: Environment variables for remote processes


From: Michael Albinus
Subject: Re: Environment variables for remote processes
Date: Wed, 19 Nov 2014 19:18:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> It's not so simple to decide what's appropriate settings. You do NOT
>> want to propagate all your local environment variables to the remote
>> process. Your local settings of DISPLAY or DBUS_SESSION_BUS_ADDRESS, to
>> give prominent examples, would confuse your remote process heavily.
>
> Check again: these will not be present in "the difference between
> process-environment and (default-toplevel-value
> 'process-environment)".

But then you change the definition of process-environment. The docstring
says "let-binding `process-environment' is an easy way to temporarily
change the value of an environment variable". It does not say it should
be the only way to do that, especially for process-file.

And you still have the distinction between processes on the local host,
and processes on the remote host. The former ones can expect all
settings from process-environment, the latter ones can expect only the
environment vatriables which are different to the toplevel value. Up to
now, nobody had to care about processes running locally or remote;
process-file did arrange it magically.

I do not say that I completely oppose (I start to understand your
proposal), but this might break existing code.

Fortunately, we do not need to care XEmacs compatibility here: there is
no process-file :-)

> That's why I suggested to send "env <ENV> <CMD>".  Another option
> might be:
>
>     (export VAR1=VAL1
>      unset VAR2
>      export VAR3=VAL3
>      ...
>      <CMD>)

Another possibility might be heredoc commands. But that's an
implementation detail.

> -- Stefan

Best regards, Michael.



reply via email to

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