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:48:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Augusto Stoffel <arstoffel@gmail.com> writes:

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

Because there's a lot of functions out there, which work for the local
host, and should work also for remote hosts. See for example
vc-git-grep, which has

--8<---------------cut here---------------start------------->8---
(let ((default-directory dir)
      (compilation-environment (cons "PAGER=" compilation-environment)))
--8<---------------cut here---------------end--------------->8---

compilation-environment will be propagated to process-environment later
on. And the setting for PAGER is needed for both local and remote
instances of vc-git-grep. There's no special code in vc-git-grep for the
remote case.

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

Hmm, I don't see it immediately. Maybe we could discuss this in a
separate thread, where you specify in more detail what you like?
Perhaps, connection-local variables are the solution for you.

Best regards, Michael.



reply via email to

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