GNU bug report logs -
#10705
24.0.93; Collect strings matching regexp from Isearch
Previous Next
Reported by: Juri Linkov <juri <at> jurta.org>
Date: Thu, 2 Feb 2012 21:38:02 UTC
Severity: normal
Found in version 24.0.93
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Juri Linkov <juri <at> jurta.org>
> Cc: 10705 <at> debbugs.gnu.org
> Date: Sat, 04 Feb 2012 02:14:15 +0200
>
> >> Interactively, REGEXP is the current search regexp or a quoted search
> >> string. NLINES has the same meaning as in `occur'."
> >
> > is not clear enough: what is a "quoted search string"? I'd suggest to
> > describe explicitly the 3 cases handled by the code:
> >
> >> + (regexp (cond
> >> + (isearch-word (word-search-regexp isearch-string))
> >> + (isearch-regexp isearch-string)
> >> + (t (regexp-quote isearch-string)))))
> >
> > and refer to the relevant string in each case.
>
> Is this better?
>
> === modified file 'lisp/isearch.el'
> --- lisp/isearch.el 2012-02-03 23:50:41 +0000
> +++ lisp/isearch.el 2012-02-04 00:10:01 +0000
> @@ -1464,8 +1464,11 @@ (defun isearch-query-replace-regexp (&op
>
> (defun isearch-occur (regexp &optional nlines)
> "Run `occur' with regexp to search from the current search string.
> -Interactively, REGEXP is the current search regexp or a quoted search
> -string. NLINES has the same meaning as in `occur'."
> +Interactively, in word search REGEXP is computed from words
> +without regard to punctuation, in regexp search REGEXP is
> +the current search regexp, in normal search REGEXP is created
> +from the current search string quoting all special regexp characters.
> +NLINES has the same meaning as in `occur'."
When you say "in word search" etc., you actually mean "when invoked
after a word search command", right? If so, I suggest the following
wording:
Run `occur' using the last search string as the regexp.
Interactively, REGEXP is constructed using the search string from the
last search command.
If the last search command was a word search, REGEXP is computed from
the search words disregarding punctuation. If the last search
command was a regular expression search, REGEXP is the regular
expression used in that search. If the last search command searched
for a string, REGEXP is constructed by quoting all the special
characters in that string.
> BTW, shouldn't this new feature (collecting strings with `C-u M-x occur')
> be announced in NEWS?
I think it should be.
Thanks.
This bug report was last modified 13 years and 94 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.