-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use simpler ‘\r’ instead of cursor manipulation escape sequences #393
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, makes sense.
@andreasabel @VictorCMiraldo @martijnbastiaan any Emacs users to test please?
@sergv wrote:
Please detail the procedure how to verify this change. Meaning give the tests in enough detail so I can mechanically reproduce them on my side. |
Instructions are as follows:
Take special note to observe that progress percentage is shown for currently running test. They're visible for me so you'll probably be able to see them to. If not, please increase the number fo tests.
|
@andreasabel Did you get any luck with reproducing the changes? |
@andreasabel Bump please |
This primarily benefits displaying progress in Emacs’s shell-mode since it supports \r but doesn’t support ansi escapes other than color manipulation ones.
…dditional escape sequence
@sergv Thanks for the testing instructions, and sorry for the delay. I cloned your PR, but I am failing to run the tests as you describe
I am getting
|
@andreasabel I've updated https://github.com/sergv/tasty-progress-test.git a bit but since I didn't get your error message I doubt that I fixed it. I'm not sure what went wrong on your side, perhaps your @Bodigrim To facilitate demonstraction, I've recorded screencasts showing how my test works in vanilla Emacs without user config: Longer version showing versions of the tools used if anyone is curious to reproduce: |
Apologies, @sergv, I misread the instructions, I thought that Here the very boring movie where emacs censors the percentage for 15 seconds: Screen.Recording.2023-12-08.at.05.58.18.mov |
@andreasabel When |
Anyone else wants to test, @VictorCMiraldo ? |
I reproduced the instructions following the video and can confirm that it works as advertised. Thanks! |
NB b152a0b commit (Simplify further: \r is sufficient to clear whole line, no need for additional escape sequence) was reverted but it was not really crucial to make Emacs work with tasty. But it did introduce undesirable effects on most other terminals. The problem with not issuing 'clear line' escape sequence is that regular terminals upon seeing |
This primarily benefits displaying progress in Emacs’s shell-mode since it supports \r but doesn’t support ansi escapes other than color manipulation ones.
Checked that it works on Linux and Windows in msys, cygwin and cmd.exe (the last one doesn't display colors correctly though but cursor manipulation is OK).