emacs-devel
[Top][All Lists]
Advanced

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

Environment variables for remote processes (was: bug#18940: 24.4; vc-hg


From: Michael Albinus
Subject: Environment variables for remote processes (was: bug#18940: 24.4; vc-hg does not disable pager, leading to hangs (at least with tramp))
Date: Mon, 17 Nov 2014 19:48:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Maybe I'm missing something, but what's wrong with let-binding
>> process-environment?
>
> Nothing wrong with it.  The problem is that Tramp ignores those
> let-bindings because it fails to propagate this environment to its
> remote sub-processed.

The problem is, that not all settings of process-environment might be
desired on remote hosts. process-environment keeps *local* variables.

Furthermore, some remote settings might be requested which are not in
process-environment by default. A user shall not be responsible for
those settings; that's why there is tramp-remote-process-environment.
But this is also not satisfactory, because there might be even different
settings required for different hosts.

> `tramp-sh-handle-process-file' really needs to compare
> process-environment with (default-toplevel-value 'process-environment)
> to infer the env-vars that have been added via let-binding and then
> propagate those to the remote sub-process.

tramp-sh-handle-process-file does not start a new process, it reuses the
existing one. The propagation to the remote sub-process must ensure,
that those settings are not permanent. Via a subshell, or alike.

It's not that easy as it looks at first glance. That's why I would like
a kind of design, before starting to implement.

>         Stefan

Best regards, Michael.



reply via email to

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