From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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: Fri, 10 May 2024 00:15:14 +0200 Message-ID: <87y18i3a4t.fsf@gmx.de> 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> <86wmo4888l.fsf@gnu.org> <87cypu4zv4.fsf@gmx.de> <86h6f66cm9.fsf@gnu.org> <8734qq4x8r.fsf@gmx.de> <26ee9e8b-0aad-46bc-a748-e611bf237575@gmail.com> Reply-To: Michael Albinus Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11752"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 70792@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 10 00:16:35 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 1s5C42-0002qv-Hl for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 May 2024 00:16:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5C3l-0007e8-EY; Thu, 09 May 2024 18:16:17 -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 1s5C3Y-0007cB-KU for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 18:16:10 -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 1s5C3X-0004Zt-NW for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 18:16:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s5C3V-000220-RL for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 18:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 May 2024 22:16:01 +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.17152929257778 (code B ref 70792); Thu, 09 May 2024 22:16:01 +0000 Original-Received: (at 70792) by debbugs.gnu.org; 9 May 2024 22:15:25 +0000 Original-Received: from localhost ([127.0.0.1]:40893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5C2u-00021M-QO for submit@debbugs.gnu.org; Thu, 09 May 2024 18:15:25 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:39079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5C2q-00021G-AZ for 70792@debbugs.gnu.org; Thu, 09 May 2024 18:15:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1715292915; x=1715897715; i=michael.albinus@gmx.de; bh=ObU1k+otLqZyffxYbrXjXE9+ALlC7wg0HtD12mHlrUg=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=dfCIUqzFkSor4i0O/fZP58Er99Lv7ufgu7sfDobNVimLjztAxcl6f21YsdLidh8R g9ozt8hDJakOG1Zw1GkK+7oNWZSW19cLFPwjeMSjv/p7h6YqIqymdpSWdyOJb4q63 KolhWKRk9LSzy3Uhgri2MZVB1or2U8y/Nn7cJCzynzCNVVYqVJfMV1GyBKtMniyA2 qZOBtUyaNMDlMU9xDu91XyjENMuYvKVK958xNXvHdic9JVUDKTwXBIxg5GwhS08Xy J/wp7xc2s4QXFUzEibJI+385MLefGXTpMvLXF8/ZVlH2AuaUB6cw7bwjQHAYHQ9s7 T5hOkAvwueSOaM9RCA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.4]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MsYqp-1su7ho09RT-00u2xa; Fri, 10 May 2024 00:15:15 +0200 In-Reply-To: <26ee9e8b-0aad-46bc-a748-e611bf237575@gmail.com> (Jim Porter's message of "Thu, 9 May 2024 13:30:57 -0700") X-Provags-ID: V03:K1:qBC8MA/U0S7P6bvuWeZ3yKq/4d/h2ufLyMH158Clg7clSQiJDyQ 6+70gH/XtxF0GGcleBwmW4K4F5mThUImi9ekvTTGwilZk7GTXmV31z5uncNp43CCVmxaPKp YGQZRN8jPzEEwd2Bbn/N9Qz74dXLQJa7uh21dEvQbor0TU2dQW9hdClh6zhWeZYpVmuz9qg r0AS+gQ5WJyztT6Fms4jw== UI-OutboundReport: notjunk:1;M01:P0:fwiccw2hFIc=;0Fz8gt4t1lfV7voDiFPD6wktgfP EA75koBAXeM02apaFb9X8AHlg6CTIrBLd9gtCMQ5RlBcMJ7ZzHi4VXfrRKfLiLW0jxhBvgZN8 JkGUoPP99Nmc/1t2ip6WfqF82TCBqKleOI8GBDsmDbwtSstOWT/bGdzwIK5+/l6VGwMt8FzWV y2tTP0FswcAD7/yjVq951/71K14A6pPqN5CwAXAyIG80cS4pxaBNy6QYa3oFkpNmixSc1J5Ch /M0+MsW8E/sDlh/i3a7rzmDGa6IKySgUujTzLDh0sCoVSBpoP908fNoMuR2tFqGBqajmWnQSg AxZyiR0LehxdveAMUCtp8WpSTIaK1AMwpntojzhb4oBcNFniQJkq9UWE/H/OMpZbtF3+ZBlbY 0UHxbd1BAZxly2YLWxUZM2+zFeFOhaO7gKMjo6dDNLMuF6YTy/qNx2ozSfNYVbDPFYEfb33qp epY2MTBWGO98mpMWeHXjWXU3DxTdnzXsaHl7vVJ1h/BEJxt7BMXxzT1jS7ZP6XB1gSy3OIMHL 01z0zYzTJ7E5rrtfSSzs077y7EsJQjtyCke2UY3vEIG9eACdrjx3mMQfWSIAmmQm0TJ3RULBJ NSAbXqv9N/e7QgAcM2SJzcQEhllugWcTXNonZtUW7jVv4cI0CPoNBcJvicrjlkjF0PF1OdhmF 4p1/vwQfPvUhP286AaeukDaU/IoHhQUq8Z26uhKuYgsb0+R92VtxYRIaTxjlg6CU8GbGt0diG SQ09WUAukKflK/ZEGjT9Um9WRJZpUwVfAJPHjgYhieMFkLB2YvE38TRL+CroIIm6VSM6LCoR 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:284779 Archived-At: Jim Porter writes: Hi Jim, >> We could start with "/local::". I'm simply not so optimistic like >> Jim, >> that it will be easy. Likely, se need a full Tramp backend for this, say >> tramp-local.el. The respective file name handler should remove the >> "/local::" prefix from the arguments, call the original file operation, >> and add the "/local::" prefix on the results where appropriate. >> And somehow, I'd like to check that this is called from Eshell >> only. Am >> I paranoid? Will people use it on their own? > > Maybe the better solution would simply be for "/local:"[1] to be an > Eshell-only syntax that DTRT within Eshell. There shouldn't be any > conflict so long as Tramp promises not to add a "local" method. :) Promised. Tramp uses just a tramp-file-name structure in tramp-null-hop, that's it. > Now, it's possible that this could conflict with Tramp's alternate > file name syntax, but a) this feature will be disabled by default to > avoid automatically changing the meaning of existing Eshell forms, and > b) Eshell could look at Tramp's syntax and change the spelling for > "/local:" to avoid collisions if we wanted to avoid this. OK. > (If in the future, we came up with an Emacs-wide use case for this, it > should be possible to upgrade "/local:" to a full magic file name. I'm > not sure why we'd want this though.) > > [1] Note the single colon, though I'm not dead-set on this. If it's > just an Eshell notation and not part of Tramp, we don't necessarily > need to follow Tramp syntax. Of course, if we wanted to keep open the > possibility that this becomes a new Tramp method, maybe the "::" is > the more forward-thinking route. Anyway, even if you implement this completely in Eshell, I recommend to write a file-name-handler for this. Potential 70+ primitive file operations cannot be handled w/o such a basis, I fear. Best regards, Michael.