X-Debbugs-Cc: michael.albinus@gmx.de Starting with "sudo emacs -Q -f eshell", notice that the prompt looks like: /home/user # Now start "emacs -Q -f eshell": ~ $ cd /sudo:: /sudo:root@huginn:~ $ Notice that the prompt sigil is still "$" instead of "#". I think it would be better to indicate that you have a root shell by using "#" here. Attached is a patch to do this. It adds a new function, 'user-uid-for-file', which is aware of file name handlers. Then, Tramp adds the appropriate handler. Now, Eshell can use that function and we get the prompt sigil we expect.