From unknown Tue Jun 17 22:28:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63588: 29.x: dotimes (possible) problem 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-GNU-PR-Keywords: To: 63588@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16845096942877 (code B ref -1); Fri, 19 May 2023 15:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 May 2023 15:21:34 +0000 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 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 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 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 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 From: balducci@dschgrazlin2.units.it X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.0.91 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30875.1684486510.1@dschgrazlin2.units.it> Date: Fri, 19 May 2023 10:54:46 +0200 Message-ID: <30876.1684486510@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-Spam-Score: -2.3 (--) 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 From unknown Tue Jun 17 22:28:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63588: 29.x: dotimes (possible) problem Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 May 2023 15:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63588 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "balducci@dschgrazlin2.units.it" , "63588@debbugs.gnu.org" <63588@debbugs.gnu.org> Received: via spool by 63588-submit@debbugs.gnu.org id=B63588.16845109635178 (code B ref 63588); Fri, 19 May 2023 15:43:02 +0000 Received: (at 63588) by debbugs.gnu.org; 19 May 2023 15:42:43 +0000 Received: from localhost ([127.0.0.1]:57195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q02Ff-0001LS-6b for submit@debbugs.gnu.org; Fri, 19 May 2023 11:42:43 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:51016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q02Fc-0001LI-BL for 63588@debbugs.gnu.org; Fri, 19 May 2023 11:42:41 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34JENo7c000331; Fri, 19 May 2023 15:42:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=rx1xtDWNDXfmM3nQD+bbwghSe39/sQDpQxrG2N5uZFs=; b=FAIhSdnzpTppPYYnOazobUo0fKNVq0S3uxsg2rSwLYdeflBpUjGfXKcYJcadeqTcd9CE fTvYxLRAvpteFkONg8SS2/fEo4RbG5S1G+Oaq6ss6kFErkEnpvsYYCrGdDtiBnZkg7yy ljLCoPmpKNFtLlQge6En3X9+UHAHmWRIDNqDfAHwaT/B87xQEGpV22IkzaFd7uxM0HPx 3PVPrWW7dmegUiGx3IIQypXmPiiagisX6SvH1olC91dmtlfEhYzfm4ZTEUGXymrAIxir 0zYUUbow7Akb0epfgSUm5zO6RfMFii8yNYdCUbGiHDAfabzefZlTeKnkYVZJhy0iz1c+ sw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qnkuxapbr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 May 2023 15:42:38 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 34JDu25q036165; Fri, 19 May 2023 15:42:38 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2041.outbound.protection.outlook.com [104.47.74.41]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3qmm0589xt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 May 2023 15:42:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YTZz2agzlJ6BVt9duZhk0O27H1vT0VBcrjZSk9kbxeG95Q6tV+is4TN6fPhJohcWWHslw+g0FnKRQuUkVzl7GHYpKZoCA/MyauI5F0Of5gYmMc1ZmN+EeotL83ObpXGXfeu5xFlMd5uAwTehb6I+0EZct5WkoHPALVDn0W3TGOC2119+eTCX4PE1wAhJ8HokKDeZNsz0xHhiec1Ebwqz0cayoHIAf1fqfJPTkGBcJrrxJ5bV1Be/HPTTVe9mWBEsZb/hEPSRjhfC4W0WY3mt1Miw3mi2iDEIcoZArtzpXhl3tGB1f0Jp494XQeXlgIORODlPXHYVk7xFYTT2VpFeVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rx1xtDWNDXfmM3nQD+bbwghSe39/sQDpQxrG2N5uZFs=; b=TyEbr25q/6FDnvgSRDtaz0J4gX0uTzXCcW/JnIZmtTY0/N9vGCtSLbrFVU4z41zavJmmrAZd1vQrfEdZqPkTCjsSUl4b6JCI/fa+ImYDr2038ZeSr2BNp+XsUnxGNlesnTRelulInuBLkZ2Kc8eB3jXX+nB5iIsXnjvYFoO6Z0LJWhlnPKlV/+jk2FsB4P+J4pejS7LhKS+CY83p6JhtcFzseJbo7yiaZzgInO1kNUEskLfJS9jLbuEV5KgS4yxYvD2o/JmDj02mJU/10C2rfLAN2+oPGveS7ad+t0Zi/PJd1Swe75rdyCq9ZgVeeZ95Acr5F0+mue274aCf4jy+sA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rx1xtDWNDXfmM3nQD+bbwghSe39/sQDpQxrG2N5uZFs=; b=hA/D+PTF/ynbbbWZLFugXjoe89ECQ7NMs6NvIle72rOZtuvqA0AQQ9JC8PKpWfxUgDIt8y06TSFb0lI64mes+DmoM5A4snkzhYC2MUZRdhpwCv+sN3XuzKm5zJ+uwZ1c6w5TMO8u1ef2QTJaY9EtvcjOAHj8fv73kUq/s9SjhUQ= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by CY8PR10MB6466.namprd10.prod.outlook.com (2603:10b6:930:62::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.32; Fri, 19 May 2023 15:42:36 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::a995:2ae5:2745:24ff]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::a995:2ae5:2745:24ff%6]) with mapi id 15.20.6411.020; Fri, 19 May 2023 15:42:36 +0000 From: Drew Adams Thread-Topic: [External] : bug#63588: 29.x: dotimes (possible) problem Thread-Index: AQHZimW+l6k7kK7/IU+h9ZsMJBhgfa9ht4aQ Date: Fri, 19 May 2023 15:42:36 +0000 Message-ID: References: <30876.1684486510@dschgrazlin2.units.it> In-Reply-To: <30876.1684486510@dschgrazlin2.units.it> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|CY8PR10MB6466:EE_ x-ms-office365-filtering-correlation-id: fdd1d040-611f-4403-0703-08db587fab83 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dWDDqdQZPDDIJ5QzayOj+eKVSofzzoAy9v5SadOeoutAnbX+VpCBmrdw1VWs18nnxzSnvaUjKAj5XLXAsxWl+mGqklVz6P76N7Bsqsvl2YhvEVwr6Pyw7hvOW/MD4xcZUaBxFXozIsrGA1DtTCTAEdGaP80havBhQ2eVpyaRW2BShhPHLOgTetCcIgxpr//1lGaq6qQwz7e4d9cbhRZGZIwYDbRC2EqCgPO29W3k9/1GRZ1Bvjc4VFRuk+QNZ9WSCMMiFQLi1DjuVIaJFukAQ3vCuf5eYg7Fgn20QiKdvZic0aeEHsO/ohXqcpzByLWcStWT0Z1u1XAvRi75ka7SiPjcf4+hEYwe1vWVhFDQj0mfu6f7sfAVoA+3UUtfM7ZrO+0zeNjJBKBVhUVUOwcSXVN9RBqDUOhr+ycit7XThgmUo6EqZvRg7Fxcw1HX3deKSxAzEJqmGG6GcJ3YOySMCnUKcBxliE5KCahHUchgK7HCuLZX+CPJo61prtAKtssQ3rWGy+RcLY4JztDgTC7JKoyEQmk2JAAbtxG2eO54M3QBh4SG9YXqiVsevXHvh5LCBVsSr6xSiiRa193nn5osyhW4PNvRxW0lhh30ESX3Yp0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(346002)(396003)(376002)(39860400002)(136003)(366004)(451199021)(5660300002)(66946007)(52536014)(2906002)(66556008)(76116006)(44832011)(38070700005)(41300700001)(316002)(66446008)(86362001)(66476007)(64756008)(8676002)(110136005)(8936002)(83380400001)(478600001)(122000001)(38100700002)(7696005)(966005)(71200400001)(186003)(33656002)(55016003)(9686003)(26005)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: vbuvtBEEoYjD7rJLvRVfy+iieM0ViXTxksP5imWmHRCALALnUqO2Eymr1NlqL0Gv7NsPB20UOGDuhEBET0jTPh2Y2f8IEFvbaapnK8jcyHwvmH35hkH3q1d6NvXNZ8z7Jf10qVUhEaD0k7YfepxvM9xA2FtGZfRF268wpwE+IGlVOx8qmkRcR4UWMaHj3242wj2iAG7EHSz8uud5pH0H1MP0iHcYwSmEtk4pYy7YzshdRH6LKDKIOmcgPOJw+p2uYeVUlWWevnrVkh72akBwjH6opK1uy/b4Rt6Ymtnjr1Eld3CuyFGQNJ1HsHp4AFfatV15KwaBVLfM6FTaFYtJwFX+0YrvX1gX1vzODVy0QTeiqr8eZungCEJrTRktqwslYFq97XYeoM0uV2bdVN6s1lO+0Zu379LUfK9gqjMlMdRSo+e+hQ4dItByihLtFBiv8Zy0H2VEyX9CQUzlzD4n59U8X7v1skzTyeN6KoUWZfw2Py8g4PyFUXUPj29fm6v2Ls37i9tPaOqUd4LFO8XNHwBjDfBksx43htPr1bmoOCyHs3xvlP1D0EuK7u4k1WKdW5FIhr1qCaF8yBrcE17BYXCVOX2KLKUmINqEzFQgFAcBvCZPGQI/wPZHJR8RVmlN7mqOChqD415UEFi9UIWvuBhIXjABMbFz4NeDWaG99oo4BICcnZFfhRaKdyvAaiS+w2FcCCAPlNNAMhdcPeLzZ/0qmq5xnWTJBJWbpzoJxQq6wwhpozBWYHeadmvxS62Slt9LeNzfnw+YribG4JY0JwqZV9t6HSTqLqT4nrxD6wbjVdHecpW7S7Mx4D+mpE8/N4Ceb4jjXfKshdlB26JtgT8PMncpwQO8OzDgROxQyr8xlATXIHU/E/qu8mBmFCriTJWZavui/rRrZjz0KLyTqaFD+oU4dLTdXYatwLAMEQ6hcQsiX3lSrVOATlFQL+s7wp9143DVRJNE9qy/vFGXV/FSQESmGHUhrMR4e42PBvgl/Olw+qoJ08PIX+MUeVTHrB1cD28BbnMA+ll5NAdTmTPfyrbBSUDM7vVXsDyoDFtm3Km8NvJ60hzTpAMuTVO3X18Cr77wiA6L6+2FrKzEleJLBP9dq8UNQlZ5xACylvGQvcTc5hxpHXjninOE+xPvRMVqdcp9MCN1NOD2ExNcGZ8y75//D33rp2ZHpoejssNmcOjB5CrnyLRg1CgGWMsLt6L00aObkgN7X26emKRU4i11f2f5TUb4BZIzDq35OwjL2+NgtJnKA5lh+l1C+wGuHBuuhB8fsk8kU+1r+ejzPvZNPgNnQ5pkAIyWoy3+t5C0r+gBMGdgYv9HJ6zvUlJFXIGQ32mKam+M8NzlG1lV5xK3F24kWWGUpxP/TVglZgnuBQ2ujmGiYBBInklf2xhDxX0EFBP2US8/z+0af4SkCh/YyksYNZ/a13XfAg763TmsC/yl+iC0QBHoqvtxiXQWN/T1xdR6vZjvJK6cbSGjNbdJEvfYvnvP2yx3RKZRjOk796WGDTA1CFe8Fa6nZ9iSr8QHp7d3d5R08nu+nR6KqXQWSH/vZsVegCXtJV5E0Rd1S41c2GwoKbshxpd9qdrN Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: GS++t+pZSZu66grvd/osS9CvHORd5Lt8K6cGORS8KJdkDPb8/CqubuT/XE04Z0Se3+vg/gpeAA6aRW/HKAL4VhOJn6Rn37u5+C1h5juNfizXw2FX/CGELXXHlsFQXdEovF7JDKHtLUdlwcAhBoX2CBI41PdtU+w0dGVR7GD8q4G23/1hKgHQppqGY7rD2A93ymJwLMmbSvqfFzYa8jRwW4tOdU97KRP349x0KwSrJomAizW1MGSxyoq4AXuD3JdtYpQM4LD+JBfyi2QK2ijox535Jz4+Gs3Dys+4xq0HyY9jCgzWE11DftTGgFaS+P2NWjRfV5i4Lgp3AYMol8RqmncmRDr8AJBSf3gZZ4tGbvP3PbFsKjdiPulfQTAp2Iltvg92ae99I75Ws0cnmB6Hqk7DV8QUmY0u6ic235OCmgO8JzsDcdhs3wl5GN7UWZgQDI6AhhXGTB8VybTknYzmVJDzjjOO5H+FeLA5akirwkAduAqIhDBvc3ey3pLQ8c3ZYBiUWjnkSBPeYFxZeVu0kpOpVW+M1mupyU/qnQBiR4iEDitSucVJu/11b/rhBhZAJMsgDhc4E1EBXISITDtRdrwoc+OOsfThF+BEuEYlagJ6Qd7ibhnEJ0q4x31dzuIJkl4HHsDo3fa6EwjxqL7BRTcoOjpazv83s/GqdgFDYncuhVp9DBjekVdFlkmFuL4gF28L693MzmWUG5CR2ThDCDBGAJr1fRdG0+YbdKS9syzNqtozKzzWLhYDZQoi2JqPfp11steKh4bpq5/i51xj0B0Sl1vyTeELXe9ix0MfX0IcmkXcIvt3Fef0XwEO2YE6 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fdd1d040-611f-4403-0703-08db587fab83 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 May 2023 15:42:36.4169 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 8kIavweIR3qSTgVZWjzFm2BbgSiNDMHsySqyCUEf5VimTt/swKgvhQMA7OKV5N6PTRuFKmzTXnYiyGPcPobWjA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR10MB6466 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-19_11,2023-05-17_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 malwarescore=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305190133 X-Proofpoint-ORIG-GUID: GSoTxB_t9hGmJ7Qf0tT7BnTpksz9G3ZA X-Proofpoint-GUID: GSoTxB_t9hGmJ7Qf0tT7BnTpksz9G3ZA X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 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. ... > 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 >=20 > 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) >=20 > Is the changed behavior intentional? Am I missing some blatant point here= ? >=20 > AFAICS, changing the value of the loop variable from inside the loop > body is supported by any other language which I know about No, it's not. >From CLTL2 [*]: "Altering the value of var in the body of the loop (by using setq, for example) will have unpredictable, possibly implementation-dependent results. A Common Lisp compiler may choose to issue a warning if such a variable appears in a setq." That allows an implementation of CL to define some particular behavior in this regard. But it also says that if it does, and if your CL code depends on that behavior, then it won't necessarily be portable to other CL implementations. It's unfortunate that if this Elisp change isn't backward compatible. That's indeed a consideration. But it's wise for your code not to depend on being able to change the loop variable and get any meaningful resulting behavior. Both in CL and Elisp `dotimes' lets you use RETURN to break out of the loop. That should speak to one of your use cases, at least. (dotimes (ii 100 "*********") (when (=3D 4 ii) (return "4444444444"))) CLTL2 says this: "An explicit return statement may be used to terminate the loop and return a specified value." But I don't see where this is documented for Elisp. Maybe it is documented somewhere. Should be. ___ [*] https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node89.html From unknown Tue Jun 17 22:28:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63588: 29.x: dotimes (possible) problem Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 May 2023 16:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63588 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: balducci@dschgrazlin2.units.it Cc: 63588@debbugs.gnu.org Received: via spool by 63588-submit@debbugs.gnu.org id=B63588.16845124248590 (code B ref 63588); Fri, 19 May 2023 16:08:01 +0000 Received: (at 63588) by debbugs.gnu.org; 19 May 2023 16:07:04 +0000 Received: from localhost ([127.0.0.1]:57239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q02dE-0002ES-73 for submit@debbugs.gnu.org; Fri, 19 May 2023 12:07:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q02dB-0002Dn-Rf; Fri, 19 May 2023 12:07:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q02d5-0004y7-TR; Fri, 19 May 2023 12:06:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=OkFZR7pqQdfESD2fukN6j4n6eHcR0lrNr81PsLTibhg=; b=hc+vp0uhhvBH 5IUQ0FFoNuUT+H0mFf6GGXL9ooxQzgMINhjPd4onu3lwp/TGt8RdEeqSPp1rcGTfzpKIQfzusryIk oTjRCrtCxcbUy+9Gwsactj7fAyZGqpgqNJnYoFxro4Upmc6m76sJ/xzLUXofR0YLKmop30vqS0WOD pD38EQaEU+9tgdlaEMT6kv+jC987fUuOVZB3sH8VMwNIne/cW4/e+pao0jm9mYf47msh9QJ85l0Nt 5EBHFLUbX6iopNGxEl8TF1IMcky0tCLyL8upX6QJSgRmIiJhX9k4F7nmpy1dZDmGGtVjZoZq28NYK e2uaaYgC6ZXF9t1uJk7cGQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q02d5-00043T-Cs; Fri, 19 May 2023 12:06:55 -0400 Date: Fri, 19 May 2023 19:07:10 +0300 Message-Id: <83cz2wtidt.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <30876.1684486510@dschgrazlin2.units.it> (balducci@dschgrazlin2.units.it) References: <30876.1684486510@dschgrazlin2.units.it> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) merge 63588 63586 thanks > From: balducci@dschgrazlin2.units.it > Date: Fri, 19 May 2023 10:54:46 +0200 > > hello > > the dotimes macro behaves differently in 29.x with respect to previous > versions This is an exact duplicate of bug#63586 which you submitted recently. From unknown Tue Jun 17 22:28:35 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: balducci@dschgrazlin2.units.it Subject: bug#63588: closed (Re: bug#63588: 29.x: dotimes (possible) problem) Message-ID: References: <30876.1684486510@dschgrazlin2.units.it> X-Gnu-PR-Message: they-closed 63588 X-Gnu-PR-Package: emacs Reply-To: 63588@debbugs.gnu.org Date: Wed, 06 Sep 2023 20:11:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1694031062-3983-1" This is a multi-part message in MIME format... ------------=_1694031062-3983-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #63588: 29.x: dotimes (possible) problem which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 63588@debbugs.gnu.org. --=20 63588: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D63588 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1694031062-3983-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 63588-done) by debbugs.gnu.org; 6 Sep 2023 20:10:51 +0000 Received: from localhost ([127.0.0.1]:37766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdyrS-00011d-JK for submit@debbugs.gnu.org; Wed, 06 Sep 2023 16:10:50 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:42277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdyrQ-00011K-6Z; Wed, 06 Sep 2023 16:10:49 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-500bbe3ef0eso185017e87.1; Wed, 06 Sep 2023 13:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694031041; x=1694635841; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=WXKsAkC4I7K2zxUdx4kydVx6TGM9my+yKaRbWuPpNjk=; b=M7njtWZgoEiJ+89ORyMPhtgwj9BzlyNhItI1L/Xd+tkhGgiWEKg4TkOakJv5pLV+fF RCAx2Do3AIHgH0UJ2oYXMK7OHO6PfOTPz5UyqTdSUNI8P7Ab+TnapNqhsxQcdKKJuoRn GUXn5Ord13n3Xb1XCT0PqNM+DXbEFiewxFM9mfSbbB/UxzCJulWbvHC0rTdTMM1SJ3sE P2MGZpDqjV6yxrtGvY57MzczbSEJVqMnSDpEKC4xw3vSTXEGV8gNgl8Qk2rp/giftX1T /kBVr7ufcIFlINVfZeIruRo6+7hPXhzVKwK7JkjIJQDaF1IPKVOdSSQDkHMyn3PjMjgd 57Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694031041; x=1694635841; h=content-transfer-encoding:cc: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=WXKsAkC4I7K2zxUdx4kydVx6TGM9my+yKaRbWuPpNjk=; b=L/q1yedMjB/Vmmdr+KEEENcv+hmizn64c93TGSdjSw0SNgZ/27EsK1brbcG817LWE3 tCj4YCmcLfH34fI3mA1sPoZB8YuwcEK3BP8Ubar12xov54rbTMhXATpefXy/5zE+EUVI /OUfDC9vYgWqdXNsVwI3nePyZWyE/0o+0RgQVb5Q8F/396pPaWIusWn4mG8iW0vWC6om x5Qpz9sNLhhiTj3d1DKY497KM92l4gVhtbKnYYtmzDUUMJ4LgCmRo4i5erhaXpRL2Ilj 4vqfxTNeu0M7sV9Xcgi6b/v5ggp+wEZlROkXLivLo0iKs2hritKpUfu6xRWuPvlKbgNq fTrg== X-Gm-Message-State: AOJu0Yz/C0E4GAnxmEyshtXGpi8IVLIOZPnzyMCZZ6F/VfDDXNHct18H bTXz+g029i0bkdl99ympI1dg/sWKl/YpRawVZF2mmUFnovo= X-Google-Smtp-Source: AGHT+IGYKvpIyYTpsBsyUo1vNleLlD4mZM/3XHlltK86iWk9EGwsFlKz6nowxKYG4ra1kxC8RWTSbp8oIlnwA0Wft0g= X-Received: by 2002:a05:6512:1115:b0:500:a1e4:fc45 with SMTP id l21-20020a056512111500b00500a1e4fc45mr186139lfg.21.1694031040731; Wed, 06 Sep 2023 13:10:40 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 6 Sep 2023 13:10:40 -0700 From: Stefan Kangas In-Reply-To: =?UTF-8?B?PDNBMEJENDMzLTEzQkYtNDlCNS1CNEYzLTRBMjg1QjlGQzA3MEBhY20ub3JnPiAo?= =?UTF-8?B?Ik1hdHRpYXMgRW5nZGVnw6VyZCIncyBtZXNzYWdlIG9mICJTYXQsIDIwIE1heSAyMDIzIDEwOjU2OjAx?= =?UTF-8?B?ICswMjAwIik=?= References: <4450.1684509068@dschgrazlin2.units.it> <83ednctipe.fsf@gnu.org> <838rdktdq1.fsf@gnu.org> <3A0BD433-13BF-49B5-B4F3-4A285B9FC070@acm.org> MIME-Version: 1.0 Date: Wed, 6 Sep 2023 13:10:40 -0700 Message-ID: Subject: Re: bug#63588: 29.x: dotimes (possible) problem To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63588-done Cc: Eli Zaretskii , 63588-done@debbugs.gnu.org, 63586@debbugs.gnu.org, balducci@units.it, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Version: 29.1 Mattias Engdeg=C3=A5rd writes: > 19 maj 2023 kl. 19.47 skrev Eli Zaretskii : > >> Feel free to suggest a NEWS entry, and thanks. > > There is now a NEWS entry in emacs-29. Do modify it as you like. It seems like that was all that needed doing here, so I'm closing this. ------------=_1694031062-3983-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 May 2023 15:21:34 +0000 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 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 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 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 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 To: bug-gnu-emacs@gnu.org From: balducci@dschgrazlin2.units.it Subject: 29.x: dotimes (possible) problem X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.0.91 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30875.1684486510.1@dschgrazlin2.units.it> Date: Fri, 19 May 2023 10:54:46 +0200 Message-ID: <30876.1684486510@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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 ------------=_1694031062-3983-1-- From unknown Tue Jun 17 22:28:35 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: balducci@units.it Subject: bug#63586: closed (Re: bug#63588: 29.x: dotimes (possible) problem) Message-ID: References: <4450.1684509068@dschgrazlin2.units.it> X-Gnu-PR-Message: they-closed 63586 X-Gnu-PR-Package: emacs Reply-To: 63586@debbugs.gnu.org Date: Wed, 06 Sep 2023 20:11:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1694031063-3983-3" This is a multi-part message in MIME format... ------------=_1694031063-3983-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #63588: 29.x: dotimes (possible) problem which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 63586@debbugs.gnu.org. --=20 63588: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D63588 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1694031063-3983-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 63588-done) by debbugs.gnu.org; 6 Sep 2023 20:10:51 +0000 Received: from localhost ([127.0.0.1]:37766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdyrS-00011d-JK for submit@debbugs.gnu.org; Wed, 06 Sep 2023 16:10:50 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:42277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdyrQ-00011K-6Z; Wed, 06 Sep 2023 16:10:49 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-500bbe3ef0eso185017e87.1; Wed, 06 Sep 2023 13:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694031041; x=1694635841; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=WXKsAkC4I7K2zxUdx4kydVx6TGM9my+yKaRbWuPpNjk=; b=M7njtWZgoEiJ+89ORyMPhtgwj9BzlyNhItI1L/Xd+tkhGgiWEKg4TkOakJv5pLV+fF RCAx2Do3AIHgH0UJ2oYXMK7OHO6PfOTPz5UyqTdSUNI8P7Ab+TnapNqhsxQcdKKJuoRn GUXn5Ord13n3Xb1XCT0PqNM+DXbEFiewxFM9mfSbbB/UxzCJulWbvHC0rTdTMM1SJ3sE P2MGZpDqjV6yxrtGvY57MzczbSEJVqMnSDpEKC4xw3vSTXEGV8gNgl8Qk2rp/giftX1T /kBVr7ufcIFlINVfZeIruRo6+7hPXhzVKwK7JkjIJQDaF1IPKVOdSSQDkHMyn3PjMjgd 57Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694031041; x=1694635841; h=content-transfer-encoding:cc: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=WXKsAkC4I7K2zxUdx4kydVx6TGM9my+yKaRbWuPpNjk=; b=L/q1yedMjB/Vmmdr+KEEENcv+hmizn64c93TGSdjSw0SNgZ/27EsK1brbcG817LWE3 tCj4YCmcLfH34fI3mA1sPoZB8YuwcEK3BP8Ubar12xov54rbTMhXATpefXy/5zE+EUVI /OUfDC9vYgWqdXNsVwI3nePyZWyE/0o+0RgQVb5Q8F/396pPaWIusWn4mG8iW0vWC6om x5Qpz9sNLhhiTj3d1DKY497KM92l4gVhtbKnYYtmzDUUMJ4LgCmRo4i5erhaXpRL2Ilj 4vqfxTNeu0M7sV9Xcgi6b/v5ggp+wEZlROkXLivLo0iKs2hritKpUfu6xRWuPvlKbgNq fTrg== X-Gm-Message-State: AOJu0Yz/C0E4GAnxmEyshtXGpi8IVLIOZPnzyMCZZ6F/VfDDXNHct18H bTXz+g029i0bkdl99ympI1dg/sWKl/YpRawVZF2mmUFnovo= X-Google-Smtp-Source: AGHT+IGYKvpIyYTpsBsyUo1vNleLlD4mZM/3XHlltK86iWk9EGwsFlKz6nowxKYG4ra1kxC8RWTSbp8oIlnwA0Wft0g= X-Received: by 2002:a05:6512:1115:b0:500:a1e4:fc45 with SMTP id l21-20020a056512111500b00500a1e4fc45mr186139lfg.21.1694031040731; Wed, 06 Sep 2023 13:10:40 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 6 Sep 2023 13:10:40 -0700 From: Stefan Kangas In-Reply-To: =?UTF-8?B?PDNBMEJENDMzLTEzQkYtNDlCNS1CNEYzLTRBMjg1QjlGQzA3MEBhY20ub3JnPiAo?= =?UTF-8?B?Ik1hdHRpYXMgRW5nZGVnw6VyZCIncyBtZXNzYWdlIG9mICJTYXQsIDIwIE1heSAyMDIzIDEwOjU2OjAx?= =?UTF-8?B?ICswMjAwIik=?= References: <4450.1684509068@dschgrazlin2.units.it> <83ednctipe.fsf@gnu.org> <838rdktdq1.fsf@gnu.org> <3A0BD433-13BF-49B5-B4F3-4A285B9FC070@acm.org> MIME-Version: 1.0 Date: Wed, 6 Sep 2023 13:10:40 -0700 Message-ID: Subject: Re: bug#63588: 29.x: dotimes (possible) problem To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63588-done Cc: Eli Zaretskii , 63588-done@debbugs.gnu.org, 63586@debbugs.gnu.org, balducci@units.it, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Version: 29.1 Mattias Engdeg=C3=A5rd writes: > 19 maj 2023 kl. 19.47 skrev Eli Zaretskii : > >> Feel free to suggest a NEWS entry, and thanks. > > There is now a NEWS entry in emacs-29. Do modify it as you like. It seems like that was all that needed doing here, so I'm closing this. ------------=_1694031063-3983-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 May 2023 15:11:16 +0000 Received: from localhost ([127.0.0.1]:57113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q01lD-0000Tq-Un for submit@debbugs.gnu.org; Fri, 19 May 2023 11:11:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:45998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q01lB-0000Ti-SF for submit@debbugs.gnu.org; Fri, 19 May 2023 11:11:14 -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 ) id 1q01lB-0006Z8-JF for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 11:11:13 -0400 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 1q01l9-0003ZM-KD for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 11:11:13 -0400 Received: from dschgrazlin2.units.it (loopback [127.0.0.1]) by dschgrazlin2.units.it (8.17.1/8.17.1) with ESMTP id 34JFAihv004451 for ; Fri, 19 May 2023 17:10:44 +0200 To: bug-gnu-emacs@gnu.org From: balducci@units.it Subject: 29.x: dotimes (possible) problem X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.0.91 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4449.1684509068.1@dschgrazlin2.units.it> Date: Fri, 19 May 2023 17:10:44 +0200 Message-ID: <4450.1684509068@dschgrazlin2.units.it> X-Greylist: inspected by milter-greylist-4.6.4 (dschgrazlin2.units.it [0.0.0.0]); Fri, 19 May 2023 17:10:44 +0200 (CEST) for IP:'127.0.0.1' DOMAIN:'loopback' HELO:'dschgrazlin2.units.it' FROM:'balducci@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 17:10:44 +0200 (CEST) Received-SPF: pass client-ip=140.105.55.81; envelope-from=balducci@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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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 ------------=_1694031063-3983-3--