From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: INSIDE_EMACS and Tramp Date: Mon, 04 May 2020 09:08:45 +0200 Message-ID: <87d07kdvnm.fsf@gmx.de> References: <20200402230535.10490.95720@vcs0.savannah.gnu.org> <20200402230536.E0A3F20CDD@vcs0.savannah.gnu.org> <87lfndarwh.fsf_-_@gmx.de> <87blo78exg.fsf@gmx.de> <871rp357s1.fsf@gmail.com> <87lfmzg3ds.fsf@gmx.de> <87a7397tqz.fsf@gmail.com> <87o8r6wfni.fsf@gmx.de> <87k11txkox.fsf@gmx.de> <874ksxf1bx.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="8975"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org, Federico Tedin To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 04 09:11:45 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVVGT-0002Fe-TH for ged-emacs-devel@m.gmane-mx.org; Mon, 04 May 2020 09:11:45 +0200 Original-Received: from localhost ([::1]:59968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVVGS-0001Xw-PG for ged-emacs-devel@m.gmane-mx.org; Mon, 04 May 2020 03:11:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVVDg-0008U2-UE for emacs-devel@gnu.org; Mon, 04 May 2020 03:08:52 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:39307) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVVDf-0008FA-R5 for emacs-devel@gnu.org; Mon, 04 May 2020 03:08:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1588576126; bh=CRiH7oXUiYnDaw9dJhnorEnMrR6huZVbAuAQetzOdFI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=AqMqzOaPohZu7rHdB/VokrLNXzDOTl1pcW9ifasEo2o+JwNjHkONfePrslCkXnJbX c2r0NEkdmJF/eSlsWpAd28UqRipsNdYxibxJkfqJhpX9iVwsHc0hQLE1tIYveDPUai hk1hoDzWQJwAAYBLInWXyZJBV5WkDWc6M7OuGHQY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([212.86.62.97]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MD9XF-1jMOOl2I7t-009984; Mon, 04 May 2020 09:08:46 +0200 In-Reply-To: (Stefan Monnier's message of "Sun, 03 May 2020 16:54:48 -0400") X-Provags-ID: V03:K1:P91lwbuYK94Kb4Q2Wp8tlHfYxlQwE9yS2LwbP0+zE2Pwf8I3srF AWQQiiJc+GNqwi4sf8pL4CnFpUjmG/VFn6tSFJotUu7W/91MsoYRoB0Iv7fYwXrJ1y0ZoFR uBsW5kG3Ew/YnovIyk/ov/qDa+3oZavOzyXdGiLXXCTJgQnKCM0MZgWSVjoUgx59Yw6uU0d J9fe1sLcG5NNs2eHBSBjQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:nI18HtQvqlg=:eWR9YWW8FY+qDg1Q9cjVvs Odek53ufw6FJmSfXg9tYNcVESzeleFKEs0ZWGCHZtoNrotUlUJBzzveXZRQXXK2sXYn3h+S5P /K1KzBq5fTo9Hn3knlcQJkGa3mKENuv+a8rbY90iu8K9sITVW9Gjc84DaLxgKNeZrihfS8hM3 o4/wkdrt6Kx+Mo/O4lhNk/7h/Xdb6Yidavesb1idLKjfNg9kKH6CTMfW2QkpihHjgCytyDehM SG6RPK58kIu6a3sCCwU3L5i+XO2u9pUqrRnAhR2kGszRn94fDXmjf+DT8blKGS5lTggQHMfwx XeaSt8F+UzsTVCuIQBuZBsOta88LNG0nw0w7C7SjB3i+XBGq0Qj4eyDWBGTFYLPzOQZJ+sMFu ToepPsYIv66lrYrdwAk61NgJZu6gixW74U5iya68B4dRryULiCporqwsfxqYN5EOCdb86RaRp eOdtuDsfDReJ/vMVEAwnp3FUby/cyeBwl3ruvN6YS5HLLxV5xlX0se0yXUqRr/7V5+unWzOK8 ivn3s5uiFYiiq9PUaj0NDOb8I8Gs+AAYoqMzSg5v0hyQMkBXCwI97Glj983e9zoh1pGN/ZNwi dcNKP/A6HIvQgtW1n1m2jEGlquKeDZBxxPxaNJgP0VJFBLG5VvJKlY0Cq4a4k+JRl5MUXY1+m tjfA20jxqkC0r7KRENF9/oG9QUEZILvW+zt6utRNZYHUkhciV9Enm9RgqTj6gUhWRmUnlZ3Y1 Y4xOxADw2cDSVBX9Sb7jP+4uOfheKU0Bb8rG5Pz8FU9Qs3ZARnmUeTQ5L7AP9+kF7HA+JzKP Received-SPF: pass client-ip=212.227.17.22; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 03:08:50 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:248791 Archived-At: Stefan Monnier writes: Hi Stefan, >> This is the scenario indeed. But what happens now, w/o the patch: > > w/o which patch? The patch I have shown two days ago and you have commented (Message-ID <87o8r6wfni.fsf@gmx.de>). >> - 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). > > I'm not sure I understand. Do you mean to say that the code which calls > `start-file-process` runs a command of the form > > /usr/bin/env "INSIDE_EMACS=28.0.50,foo" CMD > > [ or something morally equivalent ] ? > > If so indeed my approach won't work, but is there a good reason > why the caller would want to do that instead of binding > process-environment around the call to `start-file-process` > (IOW, could we simply say that if the caller does that, they get what > they deserve?). I'm mistaken. The packages use indeed process-environment for this setting. > 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. > Stefan Best regards, Michael.