From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: problem with recent change to grep-regexp-alist Date: Sat, 06 Aug 2005 21:20:46 +0200 Message-ID: <85ek96lvn5.fsf@lola.goethe.zz> References: <20050806103401.GA369@dd213-213-54-232.pa1.infinito.it> <87r7d7j5pb.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1123356730 18927 80.91.229.2 (6 Aug 2005 19:32:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Aug 2005 19:32:10 +0000 (UTC) Cc: Emanuele Giaquinta , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 06 21:32:09 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E1UOU-00007N-Sb for ged-emacs-devel@m.gmane.org; Sat, 06 Aug 2005 21:31:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E1URP-0000Y4-T1 for ged-emacs-devel@m.gmane.org; Sat, 06 Aug 2005 15:34:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E1UQQ-00006f-HV for emacs-devel@gnu.org; Sat, 06 Aug 2005 15:33:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E1UNk-0007l5-Tz for emacs-devel@gnu.org; Sat, 06 Aug 2005 15:31:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E1UNg-0007iM-L9 for emacs-devel@gnu.org; Sat, 06 Aug 2005 15:30:52 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E1URE-0001R5-IM for emacs-devel@gnu.org; Sat, 06 Aug 2005 15:34:32 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1E1UCE-0003Hn-VB; Sat, 06 Aug 2005 15:19:03 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id F01411D46074; Sat, 6 Aug 2005 21:20:46 +0200 (CEST) Original-To: Juri Linkov In-Reply-To: <87r7d7j5pb.fsf@jurta.org> (Juri Linkov's message of "Sat, 06 Aug 2005 21:11:44 +0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:41624 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41624 Juri Linkov writes: >> In the 1.42 revision of grep.el the subpattern for the filename in the >> regexps of the first two grep-regexp-alist's elements has been changed >> from "\(.+?\)" to "\([^:\n]+\)". Now the matching fails if the >> filename contains a colon, while the previous value worked, thanks to the >> non greedy "+?" quantifier. Note that the regexp of the third >> grep-regexp-alist's element is still correct, and is the one that >> matches if grep-highlight-matches's value is "t" (which is the >> default). > > Ok, let's use "\(.+?\)". > > You can still get wrong matches with the file names like "abc:123", > but perhaps such file names are rare. Maybe \([A-Za-z]:\| ... or something? It is not like there are many Unix file names starting with a single letter followed by colon. But Linux has file names like /proc/driver/uhci/0000:00:07.2 which might not be terribly relevant, but better safe than sorry... -- David Kastrup, Kriemhildstr. 15, 44793 Bochum