Subject: Re: bug#65604: [PATCH] Display the exit code if the last command failed in Eshell

From: Jim Porter <[email-masked]>
Date: Sat, 2 Sep 2023 15:46:11 -0700

Version: 30.1

On 9/2/2023 11:54 AM, Davide Masserut via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> Jim Porter <[email-masked]> writes:
> 
>> The prompt regexp is (thankfully) almost irrelevant in Emacs 30
>> now. It only matters for paragraph-movement commands, which we could
>> probably just remap to the actual Eshell-specific commands to navigate
>> forward and backward through the prompts. I should probably just make
>> a patch for this and finally get rid of that regexp entirely.
> 
> I didn't know that, thanks.

I've now made it fully-obsolete, so it doesn't do anything anymore (now, 
Eshell implements its own paragraph navigation based on fields).

> Sorry, I meant that if we decided to show a relative long message like 
> "Running" in the mode-line, then we should show it only when it lasts 
> for more than, let's say, 0.5s.  This would prevent the mode-line from 
> moving to right for just a fraction of a second when running fast 
> commands like cd or ls.

Hmm, that's true. One benefit of the current mode-line implementation 
for Eshell is that the indicator always takes up the same width. I'll 
keep thinking about this.

>> ... in any case, maybe the simplest way forward here is to put the
>> (non-zero) exit status in the prompt like your original patch, and
>> then separately, I can try to improve the customizability of the
>> prompt, as well as thinking about what to do with the mode-line.
> 
> I have updated the patch.

Thanks. I rebased it on top of my changes and pushed it to master as 
3d08d0dd80a. Closing this bug now.