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: Sun, 03 May 2020 10:51:16 -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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="79270"; 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 Sun May 03 16:52:02 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 1jVFyI-000KQk-3h for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 16:51:58 +0200 Original-Received: from localhost ([::1]:53910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVFyH-00040J-6w for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 10:51:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVFxi-00035v-0P for emacs-devel@gnu.org; Sun, 03 May 2020 10:51:22 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:10828) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVFxf-0007IU-QY for emacs-devel@gnu.org; Sun, 03 May 2020 10:51:21 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E0107810A2; Sun, 3 May 2020 10:51:18 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2A69580EC0; Sun, 3 May 2020 10:51:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1588517477; bh=P10phXYdy7jBJ97ni+OusY/1wsX78xmpH6HlIUXd4X0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=giqoBc6oUvV+eAt9nscYcM0sRd8JeGo8+HVloRQbtTzmikJitl95/tG7ZKT/2wgxX dwa96ZuIRJgELI03mVG4AI/fqg0s4MKXQ+Ajk7o0IUITsdLtOe2msBzwE4OLdvN/F2 2rGvts5fIfz8dpQQoxF0w+JnItdHHFnrJsoW+2ENohzcHdnaiXDUk+HEN9g8bzG1sE gAc69IFSjAE+3Kize2Cn/Un7m6hXdzQWBo3oeMr490s+qpW3aJVJVvPN23tSpSc2Si f/HM49wACBy2wQmRAbkYooBNMR1UHyepGusk0/PLLHpPoOevin6pi0xPqtvMcKbm15 5dCUn677321hQ== Original-Received: from alfajor (unknown [216.154.3.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C809C120484; Sun, 3 May 2020 10:51:16 -0400 (EDT) In-Reply-To: <87k11txkox.fsf@gmx.de> (Michael Albinus's message of "Sun, 03 May 2020 14:33:02 +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/03 10:45:02 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:248695 Archived-At: > 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