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: Thu, 20 Nov 2014 16:52:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> 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.
>
> What other way do you have in mind?
>
> If you just use straight `setq' this will affect all subsequent
> executions of subprocesses, so it only makes sense for env settings
> which are not specific for one particular subprocess.
>
> but that's quite less convenient and efficient than using `let', so I'm
> not worried if we don't handle that case.

There's setenv. And it is the recommended way to manipulate process-environment.

>> Nitpicking: there is no clean way to remove an environment variable,
>> which might have been set remotely and which you do not want to have
>> set while executing process-file.
>
> Actually, C-h v process-environment says:
>
>    irrespective of where it comes from.  To use `process-environment' to
>    remove an environment variable, include only its name in the list,
>    without "=VALUE".

You are right, I forgot this.

> -- Stefan

Best regards, Michael.



reply via email to

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