Subject: bug#60722: 30.0.50; [PATCH] Using Tramp to sudo in Eshell doesn't change prompt sigil

From: Michael Albinus <[email-masked]>
Date: Sun, 15 Jan 2023 10:23:44 +0100

Jim Porter <[email-masked]> writes:

Hi Jim,

>> Finally, I added documentation to the manuals. I didn't add any
>> Tramp regression tests though, since I wasn't sure of the right way
>> to test this.
>
> Oops. I missed an "@end defun" in the manual. Fixed.

Thanks. LGTM. Don't care about the tests, I'll add them once your patch
has arrived Emacs master.

One question is left for me: do we really need FILENAME as argument? I
believe it would be sufficient to check default-directory; this would also
be consistent with the functions for remote hosts described in os.texi.

Btw, another idea is to simplify the implementation. Let Tramp set a
connection-local variable `tramp-user-uid' or alike, and your function
`remote-user-uid' or however you rename it will ask for this
connection-local variable, like we do it already in functions
`null-device' and `path-separator'. This would avoid the overhead of
running the file name handler mechanism.

WDYT?

Best regards, Michael.