GNU bug report logs -
#6114
23.1; grep-read-files does incorrect wildcard match
Previous Next
Reported by: S Boucher <stbya <at> yahoo.com>
Date: Wed, 5 May 2010 19:42:01 UTC
Severity: normal
Found in version 23.1
Fixed in version 24.1
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 6114 <at> debbugs.gnu.org (full text, mbox):
> This bug is for (defun grep-read-files (regexp) in file grep.el.
>
> In grep-read-files, there's a call to (wildcard-to-regexp (cdr alias))
> with the assumption that (cdr alias) is a single pattern. However,
> the variable grep-files-aliases actually can have multiple patterns
> for each alias. So, the multi-pattern aliases, such as for "cc",
> cannot correctly match:
>
> (defcustom grep-files-aliases
> '(("asm" . "*.[sS]")
> ("c" . "*.c")
> ("cc" . "*.cc *.cxx *.cpp *.C *.CC *.c++")
> ... etc...
Evaluating
(wildcard-to-regexp "*.cc *.cxx *.cpp *.C *.CC *.c++")
returns
"\\`[^^@]*\\.cc [^^@]*\\.cxx [^^@]*\\.cpp [^^@]*\\.C [^^@]*\\.CC [^^@]*\\.c\\+\\+\\'"
Do you think it should be
"\\`[^^@]*\\.cc\\|[^^@]*\\.cxx\\|[^^@]*\\.cpp\\|[^^@]*\\.C\\|[^^@]*\\.CC\\|[^^@]*\\.c\\+\\+\\'"
?
--
Juri Linkov
http://www.jurta.org/emacs/
This bug report was last modified 13 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.