emacs-devel
[Top][All Lists]
Advanced

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

Re: Buffer-local process environments


From: Augusto Stoffel
Subject: Re: Buffer-local process environments
Date: Fri, 30 Apr 2021 09:29:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

>> 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.

Ah, now I see why this happens.  But I'm not sure I like the idea.  Why
not introduce a specific dynamic var for this purpose, similar to
`compilation-environment' in compile.el?

PS: Is there a single place to tell Tramp not to change the environment
of the remote host at all?  I understand the rationale for all the
automagic stuff, and I would appreciate it if I had to access lots of
remotes.  However, in my case, I only access a very small number of
servers, each of which requires a very specific configuration.

>
> A buffer-local process-environment is another, new game player.
>
> Best regards, Michael.



reply via email to

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