From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70792: 30.0.50; [PATCH] Add Eshell support for expanding absolute file names within the current remote connection Date: Wed, 08 May 2024 21:32:42 +0300 Message-ID: <86wmo4888l.fsf@gnu.org> References: <5b881f54-4c29-f8d8-d1f7-57b44e7cfc80@gmail.com> <86y18nb3ap.fsf@gnu.org> <86cypybx3f.fsf@gnu.org> <320dbb86-07b5-03ce-3ef0-a25d7978c214@gmail.com> <865xvpbzvq.fsf@gnu.org> <920fab98-d9e8-b4cd-c9bd-8bec428813eb@gmail.com> <86a5l0a195.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29613"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70792@debbugs.gnu.org To: Jim Porter , Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 08 20:34:21 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1s4m7Q-0007em-Tt for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 May 2024 20:34:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4m76-0001VZ-P2; Wed, 08 May 2024 14:34:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4m6o-0001Tl-AM for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 14:33:42 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4m6i-0005Mc-Kb for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 14:33:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4m78-0007CY-4C for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 14:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 May 2024 18:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70792 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70792-submit@debbugs.gnu.org id=B70792.171519320627674 (code B ref 70792); Wed, 08 May 2024 18:34:02 +0000 Original-Received: (at 70792) by debbugs.gnu.org; 8 May 2024 18:33:26 +0000 Original-Received: from localhost ([127.0.0.1]:50191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4m6Y-0007CI-0N for submit@debbugs.gnu.org; Wed, 08 May 2024 14:33:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4m6U-0007CB-Id for 70792@debbugs.gnu.org; Wed, 08 May 2024 14:33:24 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4m5x-0005EA-Sh; Wed, 08 May 2024 14:32:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=XpV3rEkLLaJDWdt5IWObaOUrAeM6lIwAzSTsPjXVrBE=; b=DVZKzZeVYMAt BJf1C61Y3ESBHNG/99Xoh6uSd57yVsbxcs276c5Grcs8BqNTnd6VRJEIf8aEMGLivG+z7h8lQH6kM aE5HFmpPFzxq7lvbTBf/gblD8WCYg2eAd7054OPgu3pmBXe9r2CrWrzYgQeIciRqIxnOGdXOaM2d3 lZ8mkltQCqp40jSpTJLfEpRPW0IbudRHEqgXfR7q1CSkXDYdFIMO0uZrwTQXAZZGgtXvAryLG3f0u 11z8YRyHjGjgjwYR2nNACFlLg+8NXam8zF0yvqiGL/MK4qWZom2Ryrvt+fxOR6FbkUJTVBJYrvTlP xqn2E1M6ywwDbucLH26a7w==; In-Reply-To: (message from Jim Porter on Wed, 8 May 2024 09:13:59 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284687 Archived-At: > Date: Wed, 8 May 2024 09:13:59 -0700 > Cc: 70792@debbugs.gnu.org > From: Jim Porter > > On 5/8/2024 6:20 AM, Eli Zaretskii wrote: > > I think "/:" quoting should not change the host of the file name. > > That's because the user might need this quoting for file names on the > > remote host. > > Not to say we *should* do this, but if we kept the "/:" syntax of my > patch, a user could still /:-quote a remote file name in Eshell by using > the fully-qualified name like: "/ssh:user@remote:/:/blah". > > I can construct an argument for why using /: this way in Eshell would > make sense, but maybe it's just needlessly "clever"... We do need the ability to quote like "/ssh:user@remote:/:/blah". That's why I think quoting should not "escape to local". Another reason that I think "/:" quoting should not escape to local is that "/:" is for protecting file names from being interpreted as referencing another host; a simple name like "/foo/bar/baz", when quoted as "/:/foo/bar/baz", should resolve to itself. > (As a note, Eshell already uses /:-quoting to mean "on the local host" > in one spot: for the command to run. However, I added that for Emacs 30, > so we can still change it without worrying about compatibility issues. > See the manual here for more info: > .) I think we should remove that before we release Emacs 30. It's wrong to interpret quoting this way. > > If the user wants to specify a local file name while default-directory > > is remote, the user can use the normal Tramp "/METHOD:..." notation. > > How about a new "local" method? Then users would type > "/local::~/some-file.txt". That's more typing, but it's also more clear, > and doesn't repurpose an existing syntax used elsewhere in Emacs. Don't we already have that with "/localhost:" or somesuch? > If I go this route, I'm not sure whether it would be better to make > "local" a real file name handler available everywhere in Emacs despite > only being useful for Eshell, or if Eshell should just strip out the > "/local::" prefix before sending it to other parts of Emacs. I'm leaning > towards the former though, since the latter seems like a hack that could > have unforeseen consequences. I'd like Michael's opinion on this, since we will be "invading" the Tramp methods space.