emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grep.el regexp


From: Richard M. Stallman
Subject: Re: grep.el regexp
Date: Wed, 29 Jun 2005 16:43:01 -0400

         (file1 (file2 (file3

         L. 321 Error blabla

         foobar)))

    The first line has thus 3 messages which compile.el should notice.

Here's what brought up this issue.

>     This approach has one problem: different rules in grep-regexp-alist
>     are not mutually exclusive, so information from different regexps can
>     appear in grep buffers from similar regexps.  In the worst case
>     this can cause subsequent calls of `next-error' revisiting the
>     same source line several times for each of separate regexps.

The example you showed is not an example of THAT.  You're talking
about three disjoint matches in the same line.

So while this could be an example where it is valid to have
multiple matches on the same line, it's only valid because they
match disjoint parts of the same line.

I am not sure whether that relates to the suggestion I made:

> I think that if we wrote a separate regexp for each kind of grep,
> all together they would match a lot fewer different strings than the
> current regexp does, and they would be much easier to understand.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]