unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>, emacs-devel@gnu.org
Subject: Re: problem with recent change to grep-regexp-alist
Date: Sat, 06 Aug 2005 21:20:46 +0200	[thread overview]
Message-ID: <85ek96lvn5.fsf@lola.goethe.zz> (raw)
In-Reply-To: <87r7d7j5pb.fsf@jurta.org> (Juri Linkov's message of "Sat, 06 Aug 2005 21:11:44 +0300")

Juri Linkov <juri@jurta.org> 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

  reply	other threads:[~2005-08-06 19:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-06 10:34 problem with recent change to grep-regexp-alist Emanuele Giaquinta
2005-08-06 18:11 ` Juri Linkov
2005-08-06 19:20   ` David Kastrup [this message]
2005-08-07 14:25     ` Emanuele Giaquinta
2005-08-08 20:38       ` Juri Linkov
2005-08-08 22:56         ` Emanuele Giaquinta
2005-08-10  4:02           ` Juri Linkov
2005-08-09 23:57   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85ek96lvn5.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=emanuele.giaquinta@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).