[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: |
Sun, 03 May 2020 10:51:16 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> No. The point is that it is dynamic, whether Tramp needs to add a
> substring to INSIDE_EMACS, or not. Compare
>
> --8<---------------cut here---------------start------------->8---
> (let ((default-directory "/"))
> (inside-emacs "foo"))
>
> => "28.0.50,foo"
> --8<---------------cut here---------------end--------------->8---
>
> --8<---------------cut here---------------start------------->8---
> (let ((default-directory "/ssh::/"))
> (inside-emacs "foo"))
>
> => "28.0.50,foo,tramp:2.5.0-pre"
> --8<---------------cut here---------------end--------------->8---
I don't understand this example: why should `inside-emacs` return
something related to Tramp just because default-directory happens to
currently point to a Tramp directory?
`inside-emacs` is only of interest when creating a subprocess, and if
that subprocess is created on a remote machine, Tramp will get a change
to add ",tramp" to it when it gets called by the
file-name-handler mechanism.
In the original situation, IIUC what happens that Eshell sets up
INSIDE_EMACS with ",eshell" then creates the process, which gets
delegated to Tramp, at which point Tramp would add ",tramp" to
INSIDE_EMACS so we'd get what we need.
Stefan
- Re: INSIDE_EMACS and Tramp, Michael Albinus, 2020/05/02
- Re: INSIDE_EMACS and Tramp, Eli Zaretskii, 2020/05/02
- Re: INSIDE_EMACS and Tramp, Eli Zaretskii, 2020/05/02
- Re: INSIDE_EMACS and Tramp, Stefan Monnier, 2020/05/02
- Re: INSIDE_EMACS and Tramp, Michael Albinus, 2020/05/03
- Re: INSIDE_EMACS and Tramp,
Stefan Monnier <=
- Re: INSIDE_EMACS and Tramp, Michael Albinus, 2020/05/03
- Re: INSIDE_EMACS and Tramp, Stefan Monnier, 2020/05/03
- Re: INSIDE_EMACS and Tramp, Michael Albinus, 2020/05/04
- Re: INSIDE_EMACS and Tramp, Michael Albinus, 2020/05/04
- Re: INSIDE_EMACS and Tramp, Stefan Monnier, 2020/05/04
- Re: INSIDE_EMACS and Tramp, Michael Albinus, 2020/05/04
Re: INSIDE_EMACS and Tramp, Federico Tedin, 2020/05/03