From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#7604: `loop', PATCH: loop, cl-parse-loop-clause, cl-map-intervals -- being the intervals of Date: Fri, 26 Feb 2016 16:57:48 +1030 Message-ID: <8760xcugt7.fsf@gnus.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456468162 12896 80.91.229.3 (26 Feb 2016 06:29:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Feb 2016 06:29:22 +0000 (UTC) Cc: 7604@debbugs.gnu.org To: MON KEY Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 26 07:29:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aZBtm-0007CC-FK for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Feb 2016 07:29:10 +0100 Original-Received: from localhost ([::1]:47625 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZBtl-000299-W6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Feb 2016 01:29:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZBth-00028o-Bh for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 01:29:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZBte-0005cz-2j for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 01:29:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZBtd-0005cv-Uy for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 01:29:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aZBtd-0008So-R6 for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2016 01:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Feb 2016 06:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7604 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 7604-submit@debbugs.gnu.org id=B7604.145646809832484 (code B ref 7604); Fri, 26 Feb 2016 06:29:01 +0000 Original-Received: (at 7604) by debbugs.gnu.org; 26 Feb 2016 06:28:18 +0000 Original-Received: from localhost ([127.0.0.1]:46653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZBsv-0008Rr-QJ for submit@debbugs.gnu.org; Fri, 26 Feb 2016 01:28:17 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:37115) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZBst-0008Rj-V2 for 7604@debbugs.gnu.org; Fri, 26 Feb 2016 01:28:16 -0500 Original-Received: from [175.103.25.178] (helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aZBsW-0005KB-Ld; Fri, 26 Feb 2016 07:27:53 +0100 In-Reply-To: (MON KEY's message of "Thu, 9 Dec 2010 20:30:03 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aZBsW-0005KB-Ld MailScanner-NULL-Check: 1457072874.15872@oLIkFntVaPVmtdpQPXUU4A 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:113842 Archived-At: MON KEY writes: > Current through BZR-102620 there is a bug around `loop', > `cl-parse-loop-clause', and `cl-map-intervals' which put them in > conflict with the manual (which is unclear w/re intended usage): > > ,---- > | `for VAR being the intervals [of BUFFER] ...' > | This clause iterates over all intervals of a buffer with constant > | text properties. The variable VAR will be bound to conses of > | start and end positions, where one start position is always equal > | to the previous end position. The clause allows `of', `from', > | `to', and `property' terms, where the latter term restricts the > | search to just the specified property. The `of' term may specify > | either a buffer or a string. > `---- [...] > There should be an additional infix filler word preceding `property' > as their is with the hash-table loop clauses, and he right fix IMO > would be to add a `using' syntax instead of and/or in addition to > testing for `property' which is pretty clearly (of itself) NTRT. > Such an addtion would allow for: > > (loop for being the intervals in using property > from to > collecting tp) > > Regardless, the ttached patch is current w/ BZR-102620. It fixes the > problem and remains backwards compatable with the existing behaviour > in Emacs 23. > > rgrep says nothing in core uses this loop idiom so it should be a > fairly clean fix. Since nothing uses it, and it's a non-standard Emacs extension to loop, perhaps we should just remove the intervals stuff from cl-loop? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no