[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Buffer-local process environments
From: |
Michael Albinus |
Subject: |
Re: Buffer-local process environments |
Date: |
Thu, 29 Apr 2021 19:34:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Augusto Stoffel <arstoffel@gmail.com> writes:
> I wasn't aware of recompile. The attached patch works with it. The
> attached version breaks with Tramp, but I think this is a Tramp bug.
>
> In fact, even without the patch, if I make my `process-environment'
> buffer local, then `M-x cd' to a ssh path, then do `M-! env', I see a
> mixture of my machine's environment and the remote machine's environment.
> For instance, PATH has the local machine value.
Tramp uses already a hack. Obviously, it cannot use process-environment
as-it-is on a remote machine, because it is, ahem, a remote machine and
not the local one. Therefore, Tramp forces only environemt variables,
which are not set in the defauzlt value of process-environment, to the
remote. The idea is, that specific remote environment variables are
added to process-environment via a let-binding.
A buffer-local process-environment is another, new game player.
Best regards, Michael.
Re: Buffer-local process environments, Michael Albinus, 2021/04/29