Subject: Re: bug#76072: 29.4; eshell/sudo does not work with aliases and lisp commands with absolute arguments

From: Jim Porter <[email-masked]>
Date: Wed, 5 Feb 2025 12:10:13 -0800

Thanks for the bug report.

On 2/5/2025 8:17 AM, Richard Sent wrote:
> I've found that eshell/sudo consistently does not prompt the user for
> their sudo password when an absolute path is passed as an argument for a
> lisp command, but does for relative paths and external commands.

The current behavior here is technically correct, if unexpected. 
Absolute filenames in Eshell *always* refer to the local filename (so no 
going through Tramp), just like when you pass the filename to 
'find-file'. Adding an option to adjust this behavior is bug#70792. I 
have a very WIP patch for it that would allow treating absolute 
filenames as local to the current remote connection.

> Additionally, eshell/sudo does not work when command is an alias,
> regardless of when lisp or external commands are used.

This is bug#68074, which was fixed for Emacs 30.