From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer Date: Fri, 7 Apr 2017 11:28:46 -0400 Message-ID: References: <8737dr6kxx.fsf@calancha-pc> <87h926cvgl.fsf@localhost> <87k272ow7g.fsf@calancha-pc> <87fuhpcbem.fsf@localhost> <87lgrheyvn.fsf@calancha-pc> <87pogsmefn.fsf@jane> <871st6342v.fsf@localhost> <87a87sqnpn.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1491578977 7412 195.159.176.226 (7 Apr 2017 15:29:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 7 Apr 2017 15:29:37 +0000 (UTC) Cc: 26338@debbugs.gnu.org, Juri Linkov , Marcin Borkowski , Dmitry Gutov To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 07 17:29:32 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 1cwVpI-0000uc-1d for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Apr 2017 17:29:28 +0200 Original-Received: from localhost ([::1]:51447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwVpN-0000AO-VQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Apr 2017 11:29:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwVov-0008QT-Ms for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2017 11:29:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cwVos-00024Q-JV for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2017 11:29:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38506) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cwVos-00024M-Fz for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2017 11:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cwVos-0001q4-BQ for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2017 11:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Apr 2017 15:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26338 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26338-submit@debbugs.gnu.org id=B26338.14915789377057 (code B ref 26338); Fri, 07 Apr 2017 15:29:02 +0000 Original-Received: (at 26338) by debbugs.gnu.org; 7 Apr 2017 15:28:57 +0000 Original-Received: from localhost ([127.0.0.1]:36705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwVon-0001pk-LD for submit@debbugs.gnu.org; Fri, 07 Apr 2017 11:28:57 -0400 Original-Received: from mail-oi0-f43.google.com ([209.85.218.43]:32971) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwVol-0001pU-8D for 26338@debbugs.gnu.org; Fri, 07 Apr 2017 11:28:55 -0400 Original-Received: by mail-oi0-f43.google.com with SMTP id b187so89968610oif.0 for <26338@debbugs.gnu.org>; Fri, 07 Apr 2017 08:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=3D5aoE2QXxu6KctnxBQD3VDpwXP2RmeivRxbQ84Wrh8=; b=vaY0RhtcdUAmdqLwNIMZxHD4sn0489eNnZlJs3zugMSxbzW5DETUrEafMnylMGwKcH F0VYn/5dHW4u245+uLtn3ifX/Lb0MrBVPO/DnxQTylUKJopvcskl1hSxtJb5UZCHfl1t cADkNZHRRMcDuFwnJsD3OrPTnUrYTfdSkcDZrOFBlZjkXMBB86pD8hn+v7Mhkbyht2BH zHXmepa53Ob2t7czIMpfplvVCK2HuxtADQYPUuz8okVXBvpHGU87Xlz5PpmsWOdmk560 R71f7Gm6zu/iTH4vOkSiXu/0K8eMhUAphJkf4Uhn4+awgqYjzRbDJEbQw9V+zACKUMO0 ToWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=3D5aoE2QXxu6KctnxBQD3VDpwXP2RmeivRxbQ84Wrh8=; b=rVDBqiuLv/kGby5xAd0g6c7m+6F845jGQEcpN09cPpPpMqj8hfH1zdIg5qPoCJ0EZV S1vjo2i4OBpwDd6f/rsFtNCMPZL3knw6W6nDrIaxii1Ltn/2fO+8ftX3v3tKnwN9Cze8 jk9fFaWi4OLWOLKxIMd7WbUc40vd5+obFtaUEK3tu7u/I5GVcse3RnlrsOSHvfuGVQzt pZIV651mIK4SG+68d/eXMH0OXGQl6BYJ88rxufcHMPBKq7bnBVXJyBo97uK+rvqOdbBk oLz1snWM2oIcK+E+C5pSm33QCy4kOoY1sgrRY4IZzH7Kx5HJaIisK6WVFc/DvM8T5eg+ M0Ow== X-Gm-Message-State: AFeK/H25zVwXjwrsNWgsQE1KHcFWEalY+tcSggx+FKsHPPvOnU/iiWXmDgXhgVCkjDAKVxONAIucsr91Ro3DoA== X-Received: by 10.157.38.42 with SMTP id a39mr23170311otb.267.1491578927394; Fri, 07 Apr 2017 08:28:47 -0700 (PDT) Original-Received: by 10.157.80.133 with HTTP; Fri, 7 Apr 2017 08:28:46 -0700 (PDT) In-Reply-To: <87a87sqnpn.fsf@calancha-pc> X-Google-Sender-Auth: fRNeOK0QcXO5rXvQ5tz2aaNASqI 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:131338 Archived-At: On Fri, Apr 7, 2017 at 10:47 AM, Tino Calancha wrote: > + > +@example > +(cl-loop for x being the matches of "^(defun \\(\\S +\\)" > + using '(group 1 limit 10) > + collect x) > +@end example You can reuse the existing 'repeat N' clause instead of 'using (limit N)'. (cl-loop for x being the matches of "^(defun \\(\\S +\\)" using (group 1) repeat 10 collect x) Regarding Drew's concerns about extending cl-loop with more non-Common Lisp things, I just don't see that as a problem. I suppose it would be nice to have a more easily extensible looping macro, like iterate [1]. That would be quite a bit of work though. [1]: https://common-lisp.net/project/iterate/