X-Loop: help-debbugs@HIDDEN Subject: bug#77167: 31.0.50; Add method to update the max-value for progress-reporter Resent-From: lorniu <lorniu@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 22 Mar 2025 07:59:03 +0000 Resent-Message-ID: <handler.77167.B.174263029412498 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 77167 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 77167 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.174263029412498 (code B ref -1); Sat, 22 Mar 2025 07:59:03 +0000 Received: (at submit) by debbugs.gnu.org; 22 Mar 2025 07:58:14 +0000 Received: from localhost ([127.0.0.1]:40668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tvtkD-0003FT-HQ for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 03:58:13 -0400 Received: from lists.gnu.org ([2001:470:142::17]:50448) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <lorniu@HIDDEN>) id 1tvowZ-0006EY-1f for submit <at> debbugs.gnu.org; Fri, 21 Mar 2025 22:50:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <lorniu@HIDDEN>) id 1tvowS-0002SP-2s for bug-gnu-emacs@HIDDEN; Fri, 21 Mar 2025 22:50:32 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <lorniu@HIDDEN>) id 1tvowP-0007g2-RL for bug-gnu-emacs@HIDDEN; Fri, 21 Mar 2025 22:50:31 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-2240b4de12bso24871775ad.2 for <bug-gnu-emacs@HIDDEN>; Fri, 21 Mar 2025 19:50:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742611827; x=1743216627; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=YoGyrOdGWUDSk5p3DwHA1WcGhyBZq3EnBpqOCbzbbhw=; b=Js7i00FojmsOasLRiABgI6lW2NfntXRLy5ErHaxPHoy0IXho7tAVceY1aB9npnbLtb gZmspG2LJhGd5LGHiv4ZTjg870VnP5x1W4FAPNXt0Juq1Stgkci5cDHsJoeeE9xf3VWf wepJuy6TPxzX0jX54vxfy3qzxzasOd/+JL1gi7MqTOxXBrvDyHgrC5S9RenFeVFXheiP i7+nOXzgGbp8pS20AnUdweWBnXeEHLdVKVr6ikmLb3aIgsMD3RzDhk05NnjOy/Q0c2t/ EzsH7W5tgbhomD228wJU/+9xn8upFMlLZ4shI27MkNyWHdTISKNJW622tMr84qRchPIC Mb4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742611827; x=1743216627; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YoGyrOdGWUDSk5p3DwHA1WcGhyBZq3EnBpqOCbzbbhw=; b=h+DNg3smtYOFv4heR8VjXjbrWxlLNJp1n7u8Bp2rtGRguDt+hPbiWRHINaE/TihYci uofSUaVNLFPCTqHGzOF4zEojzO58mWox3POddF403lNI0BzbF0u0c0u5HBNY1/q9nWTy jrqU4hpSESepzX2Lux6VbN+d480XehIvh77OwaMTVmUGxY3h6cWuzDJjgI3DnAWXdMZm Ij/YAYtcg3/UViYMSlj/mJPDmBqhKV626wpUfWRDNdHtAvDt8CL1gu1taTZmBl+yBu2Y AKKMTxwpc9i7fi+ywSptIL7w8aMyfRtt31JzYxDXvGa+boE+rV3OwGgwveawrEY6XVWa twUg== X-Gm-Message-State: AOJu0YwBShfPYRlDuDGnPwXfv8hAXC0+aITb3gZR5E0iGEoWtCwb0QPZ YGH2sLpbZcZa5kFfg539jIm9Ou4V5sxpubcbr2hDEervaJFkaE7kCRcBJg== X-Gm-Gg: ASbGnctZhZOQIE/G+bsKCzOBYZRHyBWi7j2YlhanQKo5eHhVgk2Gq8iUaep8tsQJIwG VXQaTqSth0y+2A8iIYVYYTroedZA/q98iNOsyocJ2jbf2Ucs+59qPwigqcknu2kbunnaCWy9PGe 0nAoAYZqieuRonS9q6TrgDVP7P4IoMZBKeUmT6knSDoalGflwa9JzkX69EDqKgOzM/X5LqltaSd 96MFuDOWGa+QFvNbCDH3yxDx0eSHrPL3sQwDTf6WW2E1RHGdWNyg2Nbjih2MQxIQQQHputgw6Rd 6LVI7c0YZSdO153WgDXvmK6PhpB52a9z X-Google-Smtp-Source: AGHT+IFQQeBRH8hc9cpe1+POZWSm9Oqf6+Tge6lYwjyBKvJD1S8vPCAGAeQGp5zCuuBBVUsmXP0CWQ== X-Received: by 2002:a05:6a20:c906:b0:1f5:8e54:9f10 with SMTP id adf61e73a8af0-1fe43205c56mr12270119637.34.1742611827344; Fri, 21 Mar 2025 19:50:27 -0700 (PDT) Received: from svarch ([119.132.18.85]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73905fa39cdsm2876009b3a.25.2025.03.21.19.50.25 for <bug-gnu-emacs@HIDDEN> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Mar 2025 19:50:26 -0700 (PDT) From: lorniu <lorniu@HIDDEN> Date: Sat, 22 Mar 2025 10:50:24 +0800 Message-ID: <875xk17p8v.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=lorniu@HIDDEN; helo=mail-pl1-x636.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Mailman-Approved-At: Sat, 22 Mar 2025 03:58:12 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) 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!
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: lorniu <lorniu@HIDDEN> Subject: bug#77167: Acknowledgement (31.0.50; Add method to update the max-value for progress-reporter) Message-ID: <handler.77167.B.174263029412498.ack <at> debbugs.gnu.org> References: <875xk17p8v.fsf@HIDDEN> X-Gnu-PR-Message: ack 77167 X-Gnu-PR-Package: emacs Reply-To: 77167 <at> debbugs.gnu.org Date: Sat, 22 Mar 2025 07:59:03 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 77167 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 77167: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77167 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 22 Mar 2025 11:53:00 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:52:59 2025 Received: from localhost ([127.0.0.1]:41279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tvxPP-0006Hk-L7 for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:52:59 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:44459) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1tvxPN-0006HP-Rc for control <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:52:58 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5e6167d0536so5527949a12.1 for <control <at> debbugs.gnu.org>; Sat, 22 Mar 2025 04:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742644371; x=1743249171; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date:message-id:reply-to; bh=i8fu30+4rqC1s134eD9b0UzqdzaWgXvs0UHOGH8fuJw=; b=OKp+9miV6WlijjSD5yqJaY+7ncaE6k8opvZ4Uu4z1g1ULK1D3UO8Qn1z6wcvN0VAzX zc4UnpN1ryT7ov9JoRM9gstDmW+4mA+UF0BOrUzicaqDkJl1fGM6ofAyAW9lWTRSCWlJ I3gUxWgw8W3F5EI6/eIgJTa6DkMTg1ePrNONHtmHvVtD92LdrkX3f/hXoU9JvSpZI5Z2 ZvURTD4qx0w2OLGEsc3VkktHrJFavsQQkfalnYNUNRXfiMsG0aaqAv8/8/OSAr1fO5yq +5YWgvmnLdH4YOwOZFMSdeD//3oanFXlc7UEvLirMs9UVTU14BZN3xWX59aTzCdW5Kw8 QZiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742644371; x=1743249171; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=i8fu30+4rqC1s134eD9b0UzqdzaWgXvs0UHOGH8fuJw=; b=mK4X0RAN6CS+VS55iviRWVOzf913wr3qq1b0pvEBJBl+KcwYZrCZnkZ+Wct0PcntNu N+u+x1hkf7KonnV79XUpocMxLojrOpX1YWElYnuoGp0jHqReTpkRDrCKOME+XtKb7pBa YakmbXL8oq6M8DhurKTWYE4vyvqlahbeqCStPrqUykOZIflH3xNW0rSmRIvhhjmlbhk1 3OaZdostujFb8Jfm8rDSxLo4OfSAfsByJ98kxiwtoC/TNf5nbgMc9kLk5yJK76pvC59h TSVcNEdaWeJiBemRI9hygdMXTyoRtpKe+5nNhhGOMC6VN+XjIgJdrqI0JN5jqWTntciI rOXg== X-Forwarded-Encrypted: i=1; AJvYcCWaSchIki/Vmy5/ow5Ht1x1MyGJQ3iRVtQlpsYnjAucHvXwRUBczUAnDI8O8HBFeid5abDDWeRA <at> debbugs.gnu.org X-Gm-Message-State: AOJu0YzVTpFVj2H0UD1r9U5W8SaPrIgcwMk8081zlkL0ILGcnrcGpKoO rZEhGrOYv5SF3xjG6jUo+HhRl1NSOwMylPdFp4eZxjvTkC/o22KNmQKIwYNioHFDqhPESZEp04d o7gltrHNRp+JCpdIeKDii0YyhIE0= X-Gm-Gg: ASbGncvMq8aPUABMjYt3YKuKQWeuXE/Sy6FjjFKK+JVy4qQHba+CmMKneNAvfTVhMm2 7wMej7B5qlM9u1U4zOZmMkNzYLQ70VWuaSz/OvWc4PrRYIJhOcZYFd7z6yHl08qzp0zbmAFyJVR TVSTl9ui7o0ApOwl0KQjtT+LXQMFE= X-Google-Smtp-Source: AGHT+IHUEmPm4ADAaKvNWH+vPSO4YWTZe6qXY2ovCCjgrXJY91nJ+ni0wbopAVfUAA0Ej1c2Uf3WhVVSF5pc/4vNNo0= X-Received: by 2002:a05:6402:35c4:b0:5e7:8efa:ba13 with SMTP id 4fb4d7f45d1cf-5ebcd40a6b3mr6394248a12.7.1742644371318; Sat, 22 Mar 2025 04:52:51 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 22 Mar 2025 11:52:51 +0000 From: Stefan Kangas <stefankangas@HIDDEN> In-Reply-To: <875xk17p8v.fsf@HIDDEN> References: <875xk17p8v.fsf@HIDDEN> MIME-Version: 1.0 Date: Sat, 22 Mar 2025 11:52:50 +0000 X-Gm-Features: AQ5f1JqhetC0qlVH9jNMFgI5yioHcJ8qXY35NVQ03Z57ScZP65HE0P3Sa6A7xlU Message-ID: <CADwFkm=TzS-NPVN2N=n5FydOei7G-Orpm9SU7GPXR0pYHwZUHw@HIDDEN> Subject: Re: bug#77167: 31.0.50; Add method to update the max-value for progress-reporter To: lorniu <lorniu@HIDDEN>, 77167 <at> debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Bcc: control <at> debbugs.gnu.org X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) severity 77167 wishlist tags 77167 + confirmed thanks lorniu <lorniu@HIDDEN> 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.
Received: (at control) by debbugs.gnu.org; 22 Mar 2025 11:53:00 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:52:59 2025 Received: from localhost ([127.0.0.1]:41279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tvxPP-0006Hk-L7 for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:52:59 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:44459) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1tvxPN-0006HP-Rc for control <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:52:58 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5e6167d0536so5527949a12.1 for <control <at> debbugs.gnu.org>; Sat, 22 Mar 2025 04:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742644371; x=1743249171; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date:message-id:reply-to; bh=i8fu30+4rqC1s134eD9b0UzqdzaWgXvs0UHOGH8fuJw=; b=OKp+9miV6WlijjSD5yqJaY+7ncaE6k8opvZ4Uu4z1g1ULK1D3UO8Qn1z6wcvN0VAzX zc4UnpN1ryT7ov9JoRM9gstDmW+4mA+UF0BOrUzicaqDkJl1fGM6ofAyAW9lWTRSCWlJ I3gUxWgw8W3F5EI6/eIgJTa6DkMTg1ePrNONHtmHvVtD92LdrkX3f/hXoU9JvSpZI5Z2 ZvURTD4qx0w2OLGEsc3VkktHrJFavsQQkfalnYNUNRXfiMsG0aaqAv8/8/OSAr1fO5yq +5YWgvmnLdH4YOwOZFMSdeD//3oanFXlc7UEvLirMs9UVTU14BZN3xWX59aTzCdW5Kw8 QZiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742644371; x=1743249171; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=i8fu30+4rqC1s134eD9b0UzqdzaWgXvs0UHOGH8fuJw=; b=mK4X0RAN6CS+VS55iviRWVOzf913wr3qq1b0pvEBJBl+KcwYZrCZnkZ+Wct0PcntNu N+u+x1hkf7KonnV79XUpocMxLojrOpX1YWElYnuoGp0jHqReTpkRDrCKOME+XtKb7pBa YakmbXL8oq6M8DhurKTWYE4vyvqlahbeqCStPrqUykOZIflH3xNW0rSmRIvhhjmlbhk1 3OaZdostujFb8Jfm8rDSxLo4OfSAfsByJ98kxiwtoC/TNf5nbgMc9kLk5yJK76pvC59h TSVcNEdaWeJiBemRI9hygdMXTyoRtpKe+5nNhhGOMC6VN+XjIgJdrqI0JN5jqWTntciI rOXg== X-Forwarded-Encrypted: i=1; AJvYcCWaSchIki/Vmy5/ow5Ht1x1MyGJQ3iRVtQlpsYnjAucHvXwRUBczUAnDI8O8HBFeid5abDDWeRA <at> debbugs.gnu.org X-Gm-Message-State: AOJu0YzVTpFVj2H0UD1r9U5W8SaPrIgcwMk8081zlkL0ILGcnrcGpKoO rZEhGrOYv5SF3xjG6jUo+HhRl1NSOwMylPdFp4eZxjvTkC/o22KNmQKIwYNioHFDqhPESZEp04d o7gltrHNRp+JCpdIeKDii0YyhIE0= X-Gm-Gg: ASbGncvMq8aPUABMjYt3YKuKQWeuXE/Sy6FjjFKK+JVy4qQHba+CmMKneNAvfTVhMm2 7wMej7B5qlM9u1U4zOZmMkNzYLQ70VWuaSz/OvWc4PrRYIJhOcZYFd7z6yHl08qzp0zbmAFyJVR TVSTl9ui7o0ApOwl0KQjtT+LXQMFE= X-Google-Smtp-Source: AGHT+IHUEmPm4ADAaKvNWH+vPSO4YWTZe6qXY2ovCCjgrXJY91nJ+ni0wbopAVfUAA0Ej1c2Uf3WhVVSF5pc/4vNNo0= X-Received: by 2002:a05:6402:35c4:b0:5e7:8efa:ba13 with SMTP id 4fb4d7f45d1cf-5ebcd40a6b3mr6394248a12.7.1742644371318; Sat, 22 Mar 2025 04:52:51 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 22 Mar 2025 11:52:51 +0000 From: Stefan Kangas <stefankangas@HIDDEN> In-Reply-To: <875xk17p8v.fsf@HIDDEN> References: <875xk17p8v.fsf@HIDDEN> MIME-Version: 1.0 Date: Sat, 22 Mar 2025 11:52:50 +0000 X-Gm-Features: AQ5f1JqhetC0qlVH9jNMFgI5yioHcJ8qXY35NVQ03Z57ScZP65HE0P3Sa6A7xlU Message-ID: <CADwFkm=TzS-NPVN2N=n5FydOei7G-Orpm9SU7GPXR0pYHwZUHw@HIDDEN> Subject: Re: bug#77167: 31.0.50; Add method to update the max-value for progress-reporter To: lorniu <lorniu@HIDDEN>, 77167 <at> debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Bcc: control <at> debbugs.gnu.org X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) severity 77167 wishlist tags 77167 + confirmed thanks lorniu <lorniu@HIDDEN> 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.
X-Loop: help-debbugs@HIDDEN Subject: bug#77167: 31.0.50; Add method to update the max-value for progress-reporter Resent-From: Stefan Kangas <stefankangas@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 22 Mar 2025 11:54:01 +0000 Resent-Message-ID: <handler.77167.B77167.174264438524219 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 77167 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: lorniu <lorniu@HIDDEN>, 77167 <at> debbugs.gnu.org Received: via spool by 77167-submit <at> debbugs.gnu.org id=B77167.174264438524219 (code B ref 77167); Sat, 22 Mar 2025 11:54:01 +0000 Received: (at 77167) by debbugs.gnu.org; 22 Mar 2025 11:53:05 +0000 Received: from localhost ([127.0.0.1]:41283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tvxPV-0006IZ-05 for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:53:05 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:45139) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1tvxPN-0006HQ-Rt for 77167 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:52:58 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5e686d39ba2so5720025a12.2 for <77167 <at> debbugs.gnu.org>; Sat, 22 Mar 2025 04:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742644371; x=1743249171; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date:message-id:reply-to; bh=i8fu30+4rqC1s134eD9b0UzqdzaWgXvs0UHOGH8fuJw=; b=OKp+9miV6WlijjSD5yqJaY+7ncaE6k8opvZ4Uu4z1g1ULK1D3UO8Qn1z6wcvN0VAzX zc4UnpN1ryT7ov9JoRM9gstDmW+4mA+UF0BOrUzicaqDkJl1fGM6ofAyAW9lWTRSCWlJ I3gUxWgw8W3F5EI6/eIgJTa6DkMTg1ePrNONHtmHvVtD92LdrkX3f/hXoU9JvSpZI5Z2 ZvURTD4qx0w2OLGEsc3VkktHrJFavsQQkfalnYNUNRXfiMsG0aaqAv8/8/OSAr1fO5yq +5YWgvmnLdH4YOwOZFMSdeD//3oanFXlc7UEvLirMs9UVTU14BZN3xWX59aTzCdW5Kw8 QZiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742644371; x=1743249171; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=i8fu30+4rqC1s134eD9b0UzqdzaWgXvs0UHOGH8fuJw=; b=sKadCWBs8FNKuaAqx3f8S2VKhnlg6XKsVOncXrN7xclksBqLW5x6Y+YS/OeoLfo80J 6dCjn3cuBShDxbqWj0GWiEOmWOgOJaJ+fSi3+E4HTH5sIAls3ESpaNGBNZfOB0OAlvMy 0LLf9cqCPr/aBp7GWghjcpH5OxPs0GV75XnfJguw/oB3oLCSDcAw2OpMrHE+wVroPaDO z0FMYMv5nMpzik88lU/xAP/KVSCaXyxtPP0AeRMgDohmmueQOImitOISEKvXrA8+dXxN M0psBd9sCVaU86gVnxMXNLNnvlp84LIHh7LH3E8Wc2tHUy++ktPAk/W0SopOrV9Og6+B 3pKg== X-Forwarded-Encrypted: i=1; AJvYcCUUcgOuZSVbQtAexEg6Uw16dQt/3FMMrUfMknZO5abvEvaopllOgn7jekOBtVpg3ExYoeRuog==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzJQut1TWsfjhh/zp7jY2H9iE23/Vl4UJbIQyEWEuNPVQxxDAaz o0cWQ2DmnTYsG2Oh2iMVddbwERT4SnDYeqYEBK2QbOsdqebqNfm0lVQNBcl4uEi0ljY0Ugqx5ga XhPPe1PqKzKUoC2LLMDxWnSGBq4g= X-Gm-Gg: ASbGncux6KnLJ3LgItPWB/oqleU2AAQ17kqd5ctZSEOaChAcCMdKorFndYat8id8QoT WL4bYgBfHyngXzqKLpac1qeewnEbPn25w9QiwvjIcAxQ5LuxkvI6sdmFV3AEb+L5D36R8BnugkI o0KAuRLdAjLUHSivaD7gFp4z/d440= X-Google-Smtp-Source: AGHT+IHUEmPm4ADAaKvNWH+vPSO4YWTZe6qXY2ovCCjgrXJY91nJ+ni0wbopAVfUAA0Ej1c2Uf3WhVVSF5pc/4vNNo0= X-Received: by 2002:a05:6402:35c4:b0:5e7:8efa:ba13 with SMTP id 4fb4d7f45d1cf-5ebcd40a6b3mr6394248a12.7.1742644371318; Sat, 22 Mar 2025 04:52:51 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 22 Mar 2025 11:52:51 +0000 From: Stefan Kangas <stefankangas@HIDDEN> In-Reply-To: <875xk17p8v.fsf@HIDDEN> References: <875xk17p8v.fsf@HIDDEN> MIME-Version: 1.0 Date: Sat, 22 Mar 2025 11:52:50 +0000 X-Gm-Features: AQ5f1JqhetC0qlVH9jNMFgI5yioHcJ8qXY35NVQ03Z57ScZP65HE0P3Sa6A7xlU Message-ID: <CADwFkm=TzS-NPVN2N=n5FydOei7G-Orpm9SU7GPXR0pYHwZUHw@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) severity 77167 wishlist tags 77167 + confirmed thanks lorniu <lorniu@HIDDEN> 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.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.