From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: balducci@dschgrazlin2.units.it Newsgroups: gmane.emacs.bugs Subject: bug#63588: 29.x: dotimes (possible) problem Date: Fri, 19 May 2023 10:54:46 +0200 Message-ID: <30876.1684486510@dschgrazlin2.units.it> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23661"; mail-complaints-to="usenet@ciao.gmane.io" To: 63588@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 19 17:22:36 2023 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 1q01wB-0005wQ-4u for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 May 2023 17:22:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q01vh-0007td-6O; Fri, 19 May 2023 11:22:05 -0400 Original-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 ) id 1q01vf-0007pu-2A for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 11:22:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q01ve-0005R6-QB for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 11:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q01ve-0000la-LL for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 11:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: balducci@dschgrazlin2.units.it Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 May 2023 15:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63588 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16845096942877 (code B ref -1); Fri, 19 May 2023 15:22:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 May 2023 15:21:34 +0000 Original-Received: from localhost ([127.0.0.1]:57130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q01vB-0000kE-9E for submit@debbugs.gnu.org; Fri, 19 May 2023 11:21:34 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:35344) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzvtL-00076W-6e for submit@debbugs.gnu.org; Fri, 19 May 2023 04:55:18 -0400 Original-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 ) id 1pzvtK-0001YE-SJ for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 04:55:14 -0400 Original-Received: from dschgrazlin2.univ.trieste.it ([140.105.55.81] helo=dschgrazlin2.units.it) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzvtI-00086T-ON for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 04:55:14 -0400 Original-Received: from dschgrazlin2.units.it (loopback [127.0.0.1]) by dschgrazlin2.units.it (8.17.1/8.17.1) with ESMTP id 34J8skuw030877 for ; Fri, 19 May 2023 10:54:46 +0200 X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.0.91 Content-ID: <30875.1684486510.1@dschgrazlin2.units.it> X-Greylist: inspected by milter-greylist-4.6.4 (dschgrazlin2.units.it [0.0.0.0]); Fri, 19 May 2023 10:54:46 +0200 (CEST) for IP:'127.0.0.1' DOMAIN:'loopback' HELO:'dschgrazlin2.units.it' FROM:'balducci@dschgrazlin2.units.it' RCPT:'' X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (dschgrazlin2.units.it [0.0.0.0]); Fri, 19 May 2023 10:54:46 +0200 (CEST) Received-SPF: none client-ip=140.105.55.81; envelope-from=balducci@dschgrazlin2.units.it; helo=dschgrazlin2.units.it X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 19 May 2023 11:21:30 -0400 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262007 Archived-At: hello the dotimes macro behaves differently in 29.x with respect to previous versions Basically: changing the value of the loop variable in the body of dotimes does not seem to have any effect, where for versions <29.x it used to. Here is a minimal stretch of dummy code clarifying the problem I'm reporting. emacs-29.0.91 (or 29.0.90) ========================== (dotimes (ii 10) (insert (format "%2d " ii)) (when (= ii 4)(setq ii 11)) ) ==> 0 1 2 3 4 5 6 7 8 9 emacs-28.2 (or any version <29.x) ================================= (dotimes (ii 10) (insert (format "%2d " ii)) (when (= ii 4)(setq ii 11)) ) ==> 0 1 2 3 4 The ability to jump out of the loop by pushing the loop variable over the upper limit is something that I happen to use in my scripts, so 29.x breaks them somehow Of course, there are very many other equivalent ways to accomplish the same result, but I don't see why this one shouldn't be supported (any longer) Is the changed behavior intentional? Am I missing some blatant point here? AFAICS, changing the value of the loop variable from inside the loop body is supported by any other language which I know about thank you very much in advance for any hint/feedback ciao -gabriele