GNU bug report logs - #77167
31.0.50; Add method to update the max-value for progress-reporter

Previous Next

Package: emacs;

Reported by: lorniu <lorniu <at> gmail.com>

Date: Sat, 22 Mar 2025 07:59:03 UTC

Severity: wishlist

Tags: confirmed

Found in version 31.0.50

To reply to this bug, email your comments to 77167 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#77167; Package emacs. (Sat, 22 Mar 2025 07:59:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to lorniu <lorniu <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 22 Mar 2025 07:59:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: lorniu <lorniu <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Add method to update the max-value for progress-reporter
Date: Sat, 22 Mar 2025 10:50:24 +0800
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!




Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 22 Mar 2025 11:53:02 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 22 Mar 2025 11:53:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77167; Package emacs. (Sat, 22 Mar 2025 11:54:01 GMT) Full text and rfc822 format available.

Message #12 received at 77167 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: lorniu <lorniu <at> gmail.com>, 77167 <at> debbugs.gnu.org
Subject: Re: bug#77167: 31.0.50;
 Add method to update the max-value for progress-reporter
Date: Sat, 22 Mar 2025 11:52:50 +0000
severity 77167 wishlist
tags 77167 + confirmed
thanks

lorniu <lorniu <at> gmail.com> 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.




This bug report was last modified 88 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.