From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: INSIDE_EMACS and Tramp Date: Mon, 04 May 2020 11:38:58 -0400 Message-ID: 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> <87d07kdvnm.fsf@gmx.de> <87368gjdcn.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="89836"; 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: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 04 17:41:52 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 1jVdE7-000NHH-Tr for ged-emacs-devel@m.gmane-mx.org; Mon, 04 May 2020 17:41:51 +0200 Original-Received: from localhost ([::1]:50138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVdE6-0000B6-Ub for ged-emacs-devel@m.gmane-mx.org; Mon, 04 May 2020 11:41:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVdBP-0003Ft-Ou for emacs-devel@gnu.org; Mon, 04 May 2020 11:39:03 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:63103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVdBO-0005Jk-EI for emacs-devel@gnu.org; Mon, 04 May 2020 11:39:02 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 53BE74508E4; Mon, 4 May 2020 11:39:01 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BE8F34508E2; Mon, 4 May 2020 11:38:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1588606739; bh=o1myxiZnVofRDEx1Mn/KKD2Q8FSYtdU3IvaM3C0psIM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=FTrXm33rmRgK2bgziviOsP6S/mYWeahFJ0Yasf7x66RD0umWoNVmWZRNGzAbLhcpO tUX2iyMVFomEC8DGm/sjHZlcHetqVoMpzbvTm6DH+XR02MpyucJtY4GBJ3VOavt6ow u4DwVBrFJVk3ZaphcA2BJW2LsKA2NXcUcpSP7mL8wB47QCejBRFtraBvzPxY2ukQBN vdaJ1tx9U4ieVFLwalVLWGZsz1zuQ2p/LSj0THYmjQnM5Z2eRhtv4dGTjUjyqgAODp be0zN2KyCb+MGu0KNN3maYwLue8AOuWwe1UFgf9KQovVwWhyORrOwra/nRL0OKBlok JZ2RjUwzb4nUw== Original-Received: from alfajor (unknown [216.154.3.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 87432120611; Mon, 4 May 2020 11:38:59 -0400 (EDT) In-Reply-To: <87368gjdcn.fsf@gmx.de> (Michael Albinus's message of "Mon, 04 May 2020 10:47:36 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 11:09:38 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:248847 Archived-At: >> 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