bug-global
[Top][All Lists]
Advanced

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

Re: Added native support for TRAMP.


From: Michael Albinus
Subject: Re: Added native support for TRAMP.
Date: Sat, 27 Feb 2021 11:43:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Shigio YAMAGUCHI <shigio@gnu.org> writes:

> Hello everybody,

Hi Shigio,

> I have put new gtags.el to the repository, which natively supports TRAMP.
> [http://cvs.savannah.gnu.org/viewvc/*checkout*/global/global/gtags.el]
> It's working somehow, can you give it a try?
>
> Required:
>   GNU Emacs version 22 or later (Tested on version 26).
> Limitations:
>   gtags-visit-rootdir: Does not work.
>   gtags-path-style: 'root is automatically converted to 'relative.

Well, I don't use GNU Global myself, so I cannot test. But I have
compared your new version with an older one, lying around here. From dry
code reading, it seems to be OK. Some Tramp functionality could be
applied more simple if the backward compatibility wouldn't be up to
Emacs 22, but that's just a side remark.

> By the way, I still cannot pass environment variables to the remote site
> using tramp mode. Can anyone please tell me how to do it?

`tramp-remote-process-environment' is the place to use, However, it sets
the environment when the connection is established. When you use an
already running connection via `process-file', it won't help.

Since Tramp 2.2.11 (Emacs 24.5), you can let-bind additional environment
variables to `process-environment', which will be used for the remote
process. The Tramp manual says:

--8<---------------cut here---------------start------------->8---
   In addition to ‘tramp-remote-process-environment’, you can set
environment variables for individual remote process calls by let-binding
‘process-environment’.  TRAMP applies any entries not present in the
global default value of ‘process-environment’ (overriding
‘tramp-remote-process-environment’ settings, if they conflict).  For
example:

     (let ((process-environment (cons "HGPLAIN=1" process-environment)))
       (process-file ...))

   Let-binding in this way works regardless of whether the process to be
called is local or remote, since TRAMP would add just the ‘HGPLAIN’
setting and local processes would take whole value of
‘process-environment’ along with the new value of ‘HGPLAIN’.
--8<---------------cut here---------------end--------------->8---

> Regards,
> Shigio

Best regards, Michael.



reply via email to

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