emacs-devel
[Top][All Lists]
Advanced

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

Re: INSIDE_EMACS and Tramp


From: Stefan Monnier
Subject: Re: INSIDE_EMACS and Tramp
Date: Mon, 04 May 2020 11:38:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> The problem with your approach is that it means calling `start-process`
>> from within a Tramp directory could launch a process with INSIDE_EMACS
>> that contains ",tramp" even tho the process is running locally.
>
> No, Tramp adds the following code snippet to inside-emacs-functions:
>
>   (when (file-remote-p default-directory) "tramp:2.5.0-pre"))
>
> The substring about Tramp appears only when it is needed.

No: `start-process` doesn't look at `default-directory` so the above
code snippet will add ",tramp" when the default-directory is remote, but
the process will still be launched locally.

> This gives me another idea: Tramp could adapt INSIDE_EMACS as provided
> by the packages via process-environment. Hmm, so simple - I should have
> thought about earlier.

Isn't that what my suggestion does?


        Stefan




reply via email to

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