From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: grep.el regexp Date: Wed, 29 Jun 2005 16:43:01 -0400 Message-ID: References: <87psuipj8b.fsf@jurta.org> <87k6kme6sp.fsf@jurta.org> <87aclb2w0m.fsf@jurta.org> <873br3xaum.fsf-monnier+emacs@gnu.org> <87u0jh6cwq.fsf-monnier+emacs@gnu.org> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1120078475 27303 80.91.229.2 (29 Jun 2005 20:54:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Jun 2005 20:54:35 +0000 (UTC) Cc: juri@jurta.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 29 22:54:27 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DnjYR-0003Y6-OP for ged-emacs-devel@m.gmane.org; Wed, 29 Jun 2005 22:53:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DnjgY-0002gW-Rc for ged-emacs-devel@m.gmane.org; Wed, 29 Jun 2005 17:01:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dnjbz-000194-FS for emacs-devel@gnu.org; Wed, 29 Jun 2005 16:56:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dnjbr-00015N-QN for emacs-devel@gnu.org; Wed, 29 Jun 2005 16:56:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dnjbp-0000x5-KW for emacs-devel@gnu.org; Wed, 29 Jun 2005 16:56:37 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DnjV0-0001Zd-Rn for emacs-devel@gnu.org; Wed, 29 Jun 2005 16:49:34 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1DnjOf-00072W-Hj; Wed, 29 Jun 2005 16:43:01 -0400 Original-To: Stefan Monnier In-reply-to: <87u0jh6cwq.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Tue, 28 Jun 2005 23:52:30 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:39909 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39909 (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.