bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70792: 30.0.50; [PATCH] Add Eshell support for expanding absolute fi


From: Jim Porter
Subject: bug#70792: 30.0.50; [PATCH] Add Eshell support for expanding absolute file names within the current remote connection
Date: Thu, 9 May 2024 13:30:57 -0700

On 5/9/2024 12:10 PM, Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:
Eli Zaretskii <eliz@gnu.org> writes:

Since there's no official Tramp method for the local host, we could
invent one now.

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. :)

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.

(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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]