Subject: Re: bug#71655: Eshell external commands do not work under GNU Emacs for Windows
From: Jim Porter <[email-masked]>
To: Michael Albinus <[email-masked]>
Cc: Eli Zaretskii <[email-masked]>, [email-masked], [email-masked]
Date: Sun, 7 Jul 2024 20:26:17 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

On 6/23/2024 10:56 PM, Michael Albinus via Bug reports for GNU Emacs, 
the Swiss army knife of text editors wrote:
> Jim Porter <[email-masked]> writes:
> 
>> I'll think about this some more and see if we can get all the checks
>> we want without making the code slower over Tramp. (Maybe Tramp caches
>> enough that this isn't a problem, but I'm not certain yet.)
> 
> If Eshell calls `process-file', it shall bind `process-file-side-effects'
> to nil if appropriate for the given command.
> 
> Furthermore, Eshell might bind `remote-file-name-inhibit-cache' to
> something which helps. The default value (10) seems to be very conservative.
After looking into this, it turns out Eshell doesn't look for a shebang 
on remote files (a comment in 'eshell-connection-local-command' claims 
that it doesn't work with Tramp syntax, but I'm not sure that's actually 
correct...).

I've therefore merged the "B" variant of my patch to emacs-30 (as commit 
130c3efa108) that checks for zero size on the file. I thought about it 
and this way seemed safer, since I'm not sure what other scenarios might 
signal a 'file-error', and I'd rather not suppress something I 
shouldn't: better for a user to file another bug in that case so we can 
evaluate it, I think.

Closing this bug now. (Though of course let me know if I've missed 
anything here.)