unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 10705@debbugs.gnu.org
Subject: bug#10705: 24.0.93; Collect strings matching regexp from Isearch
Date: Sat, 04 Feb 2012 02:14:15 +0200	[thread overview]
Message-ID: <87pqdv1mlk.fsf@mail.jurta.org> (raw)
In-Reply-To: <83haz8fjsi.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 03 Feb 2012 09:38:53 +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'."
   (interactive
    (let* ((perform-collect (consp current-prefix-arg))
 	  (regexp (cond


BTW, shouldn't this new feature (collecting strings with `C-u M-x occur')
be announced in NEWS?





  reply	other threads:[~2012-02-04  0:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-02 21:02 bug#10705: 24.0.93; Collect strings matching regexp from Isearch Juri Linkov
2012-02-03  7:38 ` Eli Zaretskii
2012-02-04  0:14   ` Juri Linkov [this message]
2012-02-04  7:26     ` Eli Zaretskii
2012-02-04 14:41       ` Drew Adams
2012-02-23  0:38       ` Juri Linkov
2012-02-23  0:57 ` Juri Linkov

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=87pqdv1mlk.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=10705@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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).