Subject: bug#35129: Unsupported escape sequences for progress in shell

From: Juri Linkov <[email-masked]>
Date: Sat, 06 Apr 2019 23:53:01 +0300

>>> Some escape sequences are unhandled in shell mode.
>>> Most often they appear when running `apt install'
>>> that shows its progress bar that is supposed to stay
>>> on the same line, but spreads over several lines,
>>> so the output looks like a mess (where ^[7 and ^[8
>>> are escape sequences currently still unhandled):
>>
>> After more research, I found an interesting post
>> https://oremacs.com/2019/03/24/shell-apt/
>> that proposes a promising way to handle
>> these escape sequences.
>>
>> So maybe this should be customizable?
>
> Looks interesting. However, we have `progress-reporter'. The code from
> above shall be made available via this.

I'm not sure if we can provide min-value/max-value for
make-progress-reporter.  If not, then it uses spinning/pulsing.
It seems progress-reporter doesn't support arbitrary strings
such as that come from underlying process like ^[7Progress: [ 0%]^[8

> This would also improve Tramp; there are requests to integrate the
> progress reporter from external commands.

Could you show an example of a progress reporter from an external command.
Do they use arbitrary strings?