emacs-devel
[Top][All Lists]
Advanced

[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: Fri, 30 Apr 2021 09:25:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Augusto Stoffel <arstoffel@gmail.com> writes:

> Hi again,

Hi Augusto,

>>> But I think it's a Tramp bug.  Tramp is supposed to completely ignore
>>> `process-environment', right?  So it shouldn't matter if that variable
>>> is buffer local or not.
>>
>> No. See my reply the other message.
>
> The following prints the words "dangerous" on emacs -Q.  Also if I
> replace "/sudo::/" by any of the ssh hosts I have access to.  This isn't
> expected, is it?
>
> (let ((default-directory "/sudo::/"))
>   (setq-local process-environment (cons
>                                    (concat "PATH=/dangerous:" (getenv "PATH"))
>                                    process-environment))
>   (shell-command "echo $PATH" t))

It is expected. Tramp does not analyze your settings. If you do (concat
"PATH=/dangerous:" (getenv "PATH")), Tramp won't object. Your decision.

>> No, they are not project-local. For example, via connection-local
>> variables you could specify which shell to use on remote.
>
> I was just saying there's perhaps an analogy here.  "Project-local
> variables" isn't a thing, as far as I know, but perhaps something like
> that could be introduced.  I'm not trying to make a concrete suggestion
> right now. :-)

Perhaps. The concepts of connection-local and project-local have been
added to Emacs independently of each other.

Best regards, Michael.



reply via email to

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