From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#73874: 29.4; Inconsistent cl-loop behavior with Common Lisp Date: Sat, 2 Nov 2024 23:06:29 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33130"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73874@debbugs.gnu.org To: Bohong Huang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 03 07:08:15 2024 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 1t7TmY-0008V9-9h for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Nov 2024 07:08:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7TmO-0005MC-15; Sun, 03 Nov 2024 01:08:04 -0500 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 1t7TmM-0005Lz-QQ for bug-gnu-emacs@gnu.org; Sun, 03 Nov 2024 01:08:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7TmM-0005FW-Hd for bug-gnu-emacs@gnu.org; Sun, 03 Nov 2024 01:08:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:MIME-Version:References:In-Reply-To:From:To:Subject; bh=NH1kJ++PWC59iLo+tFpEoagRKei0APtVnCSazv9F4uI=; b=Y8Gz9Kh6Yxmp/GTXPcIoEVEJGygiooXyAoorlCazixw33r6jL0Tn3h1S2qe0mx/wwva4pX+9801hZknyyYdgqxSA4OndjSHe7v1nShD/hqrvHhiKuojGglpHGsPZJjbgYcREj9T06IBuvJxBG9wlD0kgD8sk+o/mRyN7T+kKGcJ/NfGxMg2DfsRSRJYlMkQRgR9xZduGBLsi+yDZhS04Znh0ioVXB+4l0bTywZUwYZ7Hzy4HmbUKcv7l+VHv6OUclKFLzcjmk+FW4Lw9laRbR5r9zK1jl9D6nXWb6Cq2mDvDp5M0QNJbrZnevhG90WQIYPii2Qn/+o+ZnH8LgcSVPg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t7TmM-0001SC-Ao for bug-gnu-emacs@gnu.org; Sun, 03 Nov 2024 01:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Nov 2024 06:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73874 X-GNU-PR-Package: emacs Original-Received: via spool by 73874-submit@debbugs.gnu.org id=B73874.17306140585573 (code B ref 73874); Sun, 03 Nov 2024 06:08:02 +0000 Original-Received: (at 73874) by debbugs.gnu.org; 3 Nov 2024 06:07:38 +0000 Original-Received: from localhost ([127.0.0.1]:58217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7Tly-0001Rp-4Y for submit@debbugs.gnu.org; Sun, 03 Nov 2024 01:07:38 -0500 Original-Received: from mail-ed1-f43.google.com ([209.85.208.43]:54585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7Tlv-0001Rh-Ms for 73874@debbugs.gnu.org; Sun, 03 Nov 2024 01:07:36 -0500 Original-Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5ceca7df7f0so1023129a12.1 for <73874@debbugs.gnu.org>; Sat, 02 Nov 2024 23:07:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730613990; x=1731218790; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=NH1kJ++PWC59iLo+tFpEoagRKei0APtVnCSazv9F4uI=; b=b05dLa/K6HOYdflfsClhxyxBF8DLFPr+e843usXmTgx2E+MUFklL+w2NpBmUx8XZz+ yuu1amiBDEHr3wpUpgo1hwnTLeXygf8Hhj+Ka+Dqw28QDgld356U19cxgIF1WgpQP1/p zgBLVC8Ft1bz1l94M5FwHVgFYWEYZYVxVK4d/qWVkbNwd4Foy7O5spc51NrQiAEn0BXR aXJaa7MHb1aNXAvC9EFIEEW+7z64/9LPdU+gMRuTq+Jwb1i8gb+RbxjyD3fLKqrJPW44 KlaEOQ5pztzgUHT9CVuaIKiOhDLgUWLxyMbQpvgwTN6Oq31q0SXZV+h1zcQ8+O81EmiQ O/xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730613990; x=1731218790; h=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=NH1kJ++PWC59iLo+tFpEoagRKei0APtVnCSazv9F4uI=; b=kRQSjYf4zKa7wp83b8WWhVQUumWw45Xt87L8B990RSwIcEJoWgU9+VMcStscv5mkIG re84EWsxm0kCK5AKPX7/P1Ey1NnwaD6/G0gVOVaYauFI7/XSzhmTYlSaMcv+I3TuHbFf 6tf+Nhb8aO5CSeA4L+qedqzehKzRxPsrC6Mg4C+IX4cg3G9JfXS1vGZVMXQWLNcoGGD3 rragWMcV9y1Sx3sPZ/dV/eZ5AEsVwHMPpGopg5pOTFdenA3bY7TVDaWxhER3pNeexsiL aDhXfsXtWAIzVpA2eiB8ps50EGDh3amFDUJQdHI1snIjU1OsHAbOR3z9dMhmcPGqVuBk UeDQ== X-Gm-Message-State: AOJu0Yy40fYhMjrUwAyru/CzqFhA0mUF52UddyfkFD0f6Q4G4bb1HR3l ++W1lM+F1JwQWWbOFZ+ygV8d6JeuaQxri9oahZ8OMSyzf1ROl21DpOd5TNkHWVqAim5NyJvL8zA F1kEmDZXJDQ/YxK3Vpw2s32TphQY= X-Google-Smtp-Source: AGHT+IHipeJQsWgL+g6GB0uwigi9Twb5cKdGLJOSVVyJPgfVdvl7A07TQstI2Ed/r76155X3txqMAGc2mLy/9XQ2vm4= X-Received: by 2002:a05:6402:26cb:b0:5cb:6729:feaf with SMTP id 4fb4d7f45d1cf-5ceb92829e8mr7491790a12.16.1730613989959; Sat, 02 Nov 2024 23:06:29 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 2 Nov 2024 23:06:29 -0700 In-Reply-To: (Bohong Huang's message of "Sat, 19 Oct 2024 13:11:11 +0800") 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:294784 Archived-At: Bohong Huang writes: > Hello, Emacs developers! When I was porting a Common Lisp library to > Emacs Lisp, I found that the following minimal code example fails the > assertion in Emacs Lisp: > > ```lisp > (cl-loop for i in '(1 2 3) > for j = (1- i) > and k = (1+ i) > do (cl-assert (= i (1+ j) (1- k)))) > ``` > > But it works fine in any proper Common Lisp implementation: > > ```lisp > (loop for i in '(1 2 3) > for j = (1- i) > and k = (1+ i) > do (assert (= i (1+ j) (1- k)))) > ``` > > By observing the macro expansion, it seems that `cl-loop` does not > correctly handle the `for ... and ...` clauses, which should bind > multiple variables in the current loop context in parallel, but > `cl-loop` always uses the values from the first iteration. > > Thank you in advance for your time on this issue. Is this a duplicate of Bug#72753? https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72753