Subject: Re: bug#77167: 31.0.50; Add method to update the max-value for progress-reporter

From: Stefan Kangas <[email-masked]>
Date: Sat, 22 Mar 2025 11:52:50 +0000

severity 77167 wishlist
tags 77167 + confirmed
thanks

lorniu <[email-masked]> writes:

> Progress report is good for showing the progress. But the max-value is
> determined when creating the reporter object. However, in some cases,
> max-value is not sure at the very beginning.
>
> For example, sometimes, when downloading over the network, the max-value
> is not determined until the first data is returned. In this case, initialize
> max-value of the progress object after it created maybe a choice.
>
> Is it possible to add such function to do this?
>
>   (setq reporter (make-progress-reporter "Downloading..."))
>   (setf (progress-reporter-max-value reporter) 3300) ; something like this
>   (dotimes (i 10) (progress-reporter-update reporter (* 33 i)))
>
> Many thanks!

Makes sense to me.  Patches welcome.