From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#49536: 28.0.50; Confusing dolist-with-progress-reporter behaviour Date: Tue, 13 Jul 2021 06:54:44 +0000 Message-ID: <87czrmhfez.fsf@posteo.net> References: <87bl77tulj.fsf@posteo.net> <87o8b7t3j7.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8498"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49536@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 13 08:55:21 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3CK9-00022X-CL for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Jul 2021 08:55:21 +0200 Original-Received: from localhost ([::1]:45716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3CK8-0002mt-C5 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Jul 2021 02:55:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3CJq-0002iw-CD for bug-gnu-emacs@gnu.org; Tue, 13 Jul 2021 02:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55954) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3CJq-0006iw-0E for bug-gnu-emacs@gnu.org; Tue, 13 Jul 2021 02:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m3CJp-0007RT-NV for bug-gnu-emacs@gnu.org; Tue, 13 Jul 2021 02:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Jul 2021 06:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49536 X-GNU-PR-Package: emacs Original-Received: via spool by 49536-submit@debbugs.gnu.org id=B49536.162615929528591 (code B ref 49536); Tue, 13 Jul 2021 06:55:01 +0000 Original-Received: (at 49536) by debbugs.gnu.org; 13 Jul 2021 06:54:55 +0000 Original-Received: from localhost ([127.0.0.1]:39267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3CJi-0007R5-R9 for submit@debbugs.gnu.org; Tue, 13 Jul 2021 02:54:55 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:43955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3CJg-0007Qs-Hj for 49536@debbugs.gnu.org; Tue, 13 Jul 2021 02:54:53 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 05891240026 for <49536@debbugs.gnu.org>; Tue, 13 Jul 2021 08:54:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1626159286; bh=IwcPWYoAjUx1+4ae4jPT8TOtt4miefNcuDhDqIaFncg=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=JTSTOgquLoHjZIv1X7zc6zTRk3p/Hlx+yVLLyHe2Y8WCtqPO1LWXB6Cx3WI1WnrkR ktS0UJ7VgbuFxF3vUDKJiDdlVF9uByWatVxdtBNV0lQbGyA7mPaTg0K7pG2RC7DIca OW+IpXOPJm873BfVsoeSqZOrRn9mGy0T3KH507oS/imN+LpB4CZiXWbyzUoyiFjTwA pslsWAm73avR3c4n2jxoe/YhO4CS7NB1cv7NTWopq1K7sWAG4S23tKfVH38MkVxIYs 789YnguuN/fCjE+whlH74723UP/boI/IG+kwzsbV0Reem6UsNOQAtTDs57f61S8wEa B9cI4BC9dcdow== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GPBFx0Xyxz6tmV; Tue, 13 Jul 2021 08:54:45 +0200 (CEST) Autocrypt: addr=philipk@posteo.net; prefer-encrypt=mutual; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB In-Reply-To: <87o8b7t3j7.fsf@web.de> (Michael Heerdegen's message of "Tue, 13 Jul 2021 03:18:20 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209842 Archived-At: Michael Heerdegen writes: > Philip Kaludercic writes: > >> I am not sure if this is intentional > > Looks more like a typical problem with counting... > >> but in case it is no, the following patch should fix it: >> >> From f7da2585886bd4fd795713a605ff6bd17a4c337a Mon Sep 17 00:00:00 2001 >> From: Philip Kaludercic >> Date: Mon, 12 Jul 2021 17:26:43 +0200 >> Subject: [PATCH] Fix dolist-with-progress-reporter behaviour >> >> * subr.el (dolist-with-progress-reporter): Use the length of list >> argument as maximal value the reporter with reach >> --- >> lisp/subr.el | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/lisp/subr.el b/lisp/subr.el >> index e49c277335..20f40be40d 100644 >> --- a/lisp/subr.el >> +++ b/lisp/subr.el >> @@ -5880,7 +5880,7 @@ dolist-with-progress-reporter >> (,count 0) >> (,list ,(cadr spec))) >> (when (stringp ,prep) >> - (setq ,prep (make-progress-reporter ,prep 0 (1- (length ,list))))) >> + (setq ,prep (make-progress-reporter ,prep 0 (length ,list)))) > > I think this patch is correct: 0 stands for 0% finished, and we have > finished after processing 100% of the list's elements, whose number is > (length list). With other words: we have (+ 1 (length list)) steps: one > after having processed each element, plus the one before having started. > > Are you able to install the patch, or does someone else have to do it? I could push it, if nobody objects. > Thanks, > > Michael. -- Philip Kaludercic