GNU bug report logs -
#23088
25.1.50; progress-reporter with 2 text messages
Previous Next
Reported by: Tino Calancha <f92capac <at> gmail.com>
Date: Tue, 22 Mar 2016 10:57:01 UTC
Severity: wishlist
Tags: patch
Found in version 25.1.50
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Adding a second optional message in progress-reporter
provides more control in the output format.
When both, NEW-MESSAGE and NEW-MESAGE2
are provided to `progress-reporter-force-update', the
structure of the output string would be as follows:
1) MESSAGE: it may be the operation under course.
2) As before, the status index (i.e., 30%).
3) MESSAGE2: it may be, i.e., the current file being processed.
In following example, the status index changes the position with
every message, which is distracting.
emacs -Q:
(let* ((games '("Mega Man"
"Street Fighter II: The World Warrior"
"Double Dragon"
"Very long game with lot of stages: requires many months to complete"
"The Legend Of Zelda"
"Pac-Man"))
(num-games (length games))
(text "Checking game...")
(prep (make-progress-reporter text 0 num-games)))
(dotimes (i num-games)
(progress-reporter-force-update prep i
(format "Checking game... (%s) " (nth i games)))
(sit-for (or (and (= i 3) 5) 1)))
(message "Games check completed!"))
; A second optional string allows to present the information as described in 1-2-3 above:
(progress-reporter-force-update prep i text
(format "(%s)" (nth i games)))
; This would display the index string in the same position for each update.
In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.29)
of 2016-03-10 built on calancha-pc
Repository revision: 780a605e1d2de4b975e6f1f29b491c9af419dcff
[subr.patch (text/plain, attachment)]
This bug report was last modified 5 years and 350 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.