all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, Federico Tedin <federicotedin@gmail.com>
Subject: Re: INSIDE_EMACS and Tramp
Date: Sun, 03 May 2020 18:08:34 +0200	[thread overview]
Message-ID: <874ksxf1bx.fsf@gmx.de> (raw)
In-Reply-To: <jwv5zddhy8e.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 03 May 2020 10:51:16 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

Hi Stefan,

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

This is a shortened example for discussion; in reality we're speaking
about processes of course.

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

This is the scenario indeed. But what happens now, w/o the patch:

- start-file-process (for example) is called.

- Tramp is invoked. It starts a remote shell, passing "
  "INSIDE=EMACS=28.0.50,tramp:2.5.0-pre".

- The command given by start-file-process is executed, including
  "INSIDE=EMACS=28.0.50,foo" (for example).

Whatever Tramp does, it is overwritten. This is the reason I have
proposed this mechanism. Calling '(inside-emacs "foo")' returns in the
remote case "28.0.50,foo,tramp:2.5.0-pre", as requested.

>         Stefan

Best regards, Michael.



  reply	other threads:[~2020-05-03 16:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200402230535.10490.95720@vcs0.savannah.gnu.org>
     [not found] ` <20200402230536.E0A3F20CDD@vcs0.savannah.gnu.org>
2020-04-03  8:35   ` INSIDE_EMACS and Tramp (was: master f28166d: Copy INSIDE_EMACS env variable to subprocesses in Eshell (Bug#25496)) Michael Albinus
2020-04-04 14:53     ` Federico Tedin
2020-04-04 15:10       ` INSIDE_EMACS and Tramp Michael Albinus
2020-04-04 20:13         ` Federico Tedin
2020-04-13  9:07           ` Michael Albinus
2020-04-17 20:16             ` Federico Tedin
2020-05-02 14:54               ` Michael Albinus
2020-05-02 15:39                 ` Eli Zaretskii
2020-05-02 16:04                   ` Michael Albinus
2020-05-02 16:17                     ` Eli Zaretskii
2020-05-02 16:16                 ` Eli Zaretskii
2020-05-02 17:20                 ` Stefan Monnier
2020-05-03 12:33                   ` Michael Albinus
2020-05-03 14:51                     ` Stefan Monnier
2020-05-03 16:08                       ` Michael Albinus [this message]
2020-05-03 20:54                         ` Stefan Monnier
2020-05-04  7:08                           ` Michael Albinus
2020-05-04  8:47                             ` Michael Albinus
2020-05-04 15:38                               ` Stefan Monnier
2020-05-04 16:11                                 ` Michael Albinus
2020-05-03 14:52                 ` Federico Tedin
2020-05-03 16:19                   ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874ksxf1bx.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=federicotedin@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.