Subject: Re: bug#70792: 30.0.50; [PATCH] Add Eshell support for expanding absolute file names within the current remote connection

From: Jim Porter <[email-masked]>
Date: Thu, 9 May 2024 15:28:58 -0700

On 5/9/2024 3:15 PM, Michael Albinus via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> Promised. Tramp uses just a tramp-file-name structure in tramp-null-hop,
> that's it.

Thanks for the promise. :)

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

My initial plan here was to have Eshell treat "/local:" similarly to any 
other Eshell-specific syntax (e.g. $VARIABLE expansions): Eshell would 
parse it, convert it to a regular filename, and then no other code would 
ever see the "/local:".

That might not actually work in practice though (I haven't written the 
code yet to prove it), so another option would be to do like you say and 
add a real file-name-handler within Eshell buffers for this.