From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Newsgroups: gmane.emacs.bugs Subject: bug#6583: 23.2; cl loop macro with `and' clause Date: Sat, 24 Jun 2017 21:03:28 -0600 Message-ID: <87a84wu5tr.fsf@lylat> References: <871vbedfzq.fsf@blah.blah> <87d1abu09j.fsf@gmail.com> <87injkq5la.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1498359852 14570 195.159.176.226 (25 Jun 2017 03:04:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Jun 2017 03:04:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 6583@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 25 05:04:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOxqI-0003TN-Fl for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Jun 2017 05:04:06 +0200 Original-Received: from localhost ([::1]:41074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOxqN-0006GS-LT for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 Jun 2017 23:04:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOxqH-0006GN-If for bug-gnu-emacs@gnu.org; Sat, 24 Jun 2017 23:04:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOxqE-000142-GP for bug-gnu-emacs@gnu.org; Sat, 24 Jun 2017 23:04:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33456) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dOxqE-00013u-Cu for bug-gnu-emacs@gnu.org; Sat, 24 Jun 2017 23:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dOxqE-00046x-1J for bug-gnu-emacs@gnu.org; Sat, 24 Jun 2017 23:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Jun 2017 03:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed patch Original-Received: via spool by 6583-submit@debbugs.gnu.org id=B6583.149835982715779 (code B ref 6583); Sun, 25 Jun 2017 03:04:01 +0000 Original-Received: (at 6583) by debbugs.gnu.org; 25 Jun 2017 03:03:47 +0000 Original-Received: from localhost ([127.0.0.1]:36133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOxpy-00046R-S3 for submit@debbugs.gnu.org; Sat, 24 Jun 2017 23:03:47 -0400 Original-Received: from mail-io0-f196.google.com ([209.85.223.196]:36534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOxpw-00046C-JA for 6583@debbugs.gnu.org; Sat, 24 Jun 2017 23:03:44 -0400 Original-Received: by mail-io0-f196.google.com with SMTP id h134so10424525iof.3 for <6583@debbugs.gnu.org>; Sat, 24 Jun 2017 20:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=1fRC7Np1/ai2A2EtuE4C0y9k384Utq1pITDrvpODnug=; b=mOiXvCKq7bwLBhe9FwYgZBbOMrLEOHYYdcm5XqT6Wleqy8ztVNNAcmD27JvEODF7Vr QaDtN4srQEu3W/zGjt7VXREfwaVK17GDSLqYck63X+iqlh4d3/RnEZ7cAu3oxGLEEjHY hE+PWHxS6pOuPHOaoh3F5h3M8Qp1sWaB2fv3494C0cM6S0Dhs0sGRDibb7ZS7Vjg9Cfp xA2mk0PKSvT860bjSAyc+xM7eMTm4YaVMmurSDDy0/fGezZ6s/PsOUX22roZZPBqRMJ6 fVgBVYpaMr3LDUAd6+3RHxQsCSMCx2tSJhYoQc2SOsDPopZhZWAsqom8USnSROtdZVxA npdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=1fRC7Np1/ai2A2EtuE4C0y9k384Utq1pITDrvpODnug=; b=cpcrGuXegSqy2YbYb1ez22hr5YZw/J8EjHqlTWs0t1EgpWgbUGebcCmN1SiXJgWO6C MlZ4/cpkqySH2F3EYPIMCQEGqQZahuAfQNjJ+rsQSScOOBMtqyqM7AYsvxrNfr5tRQhY SheMzFiv/IqJF/h4Ne8n/pyPDsm4RCvy4PWYjgzYN9ppMZprnNQnJ+5BJ4JpmzZeIHMv FVTA80cBxnALSV+uJ3XMPuhv0QWw0P0tI2Z+dRZeBldzl9w5Oklt5L1Yr51YWWj/1mPX +amTdFJbdAy6EaWNb2Sw0RyDnPnofkf0GpIqywh3spDPn81hUrZhbNGZI6aUtWxc+r/n lLtQ== X-Gm-Message-State: AKS2vOxZQOhprHW2yGbAjCnp36Xu/WFN2TdXMtamBIZWssGDxEYhllQ3 97fMOox9wsHsfPtu X-Received: by 10.107.8.14 with SMTP id 14mr15146352ioi.197.1498359818687; Sat, 24 Jun 2017 20:03:38 -0700 (PDT) Original-Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id r124sm5412893iod.38.2017.06.24.20.03.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 24 Jun 2017 20:03:37 -0700 (PDT) In-Reply-To: <87injkq5la.fsf@users.sourceforge.net> (npostavs's message of "Sat, 24 Jun 2017 20:22:09 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133858 Archived-At: npostavs@users.sourceforge.net writes: > Alex writes: > I can't claim to fully understand the loop macro implementation, but > your patch breaks this example from the manual `(cl) For Clauses': > > (cl-loop for x below 5 for y = nil then x collect (list x y)) > => ((0 nil) (1 1) (2 2) (3 3) (4 4)) > (cl-loop for x below 5 and y = nil then x collect (list x y)) > => ((0 nil) (1 0) (2 1) (3 2) (4 3)) > > With your patch the second loop gives ((0 nil) (1 1) (2 2) (3 3) (4 4)) > like the first. You're right, sorry. This breaks loops with variables that are updated in loop-for-steps rather than loop-for-sets. When I started testing other cases I was accidentally using the pre-patch branch to do so. I can't think of an easy solution to cover both problems right now. If no one better suited can figure this out, I'll come back to this after completing an ert suite for cl-loop (of which I'm part-way through).