[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer
From: |
Noam Postavsky |
Subject: |
bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer |
Date: |
Fri, 7 Apr 2017 11:28:46 -0400 |
On Fri, Apr 7, 2017 at 10:47 AM, Tino Calancha <tino.calancha@gmail.com> 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/
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer, (continued)
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer, Drew Adams, 2017/04/08
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer, Philipp Stephani, 2017/04/08
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer, Tino Calancha, 2017/04/08
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer, Philipp Stephani, 2017/04/08
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer, Tino Calancha, 2017/04/08
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer, Philipp Stephani, 2017/04/22
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer, npostavs, 2017/04/08
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer, Philipp Stephani, 2017/04/22
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer, Juri Linkov, 2017/04/05
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer, Tino Calancha, 2017/04/07
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer,
Noam Postavsky <=
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer, Drew Adams, 2017/04/07
- bug#26338: 26.0.50; Collect all matches for REGEXP in current buffer, Tino Calancha, 2017/04/08