From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#10705: 24.0.93; Collect strings matching regexp from Isearch Date: Sat, 04 Feb 2012 09:26:16 +0200 Message-ID: <83d39vdppj.fsf@gnu.org> References: <874nvac6us.fsf@mail.jurta.org> <83haz8fjsi.fsf@gnu.org> <87pqdv1mlk.fsf@mail.jurta.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1328340456 26093 80.91.229.3 (4 Feb 2012 07:27:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Feb 2012 07:27:36 +0000 (UTC) Cc: 10705@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 04 08:27:36 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rta1z-0002Co-BD for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Feb 2012 08:27:31 +0100 Original-Received: from localhost ([::1]:46840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rta1x-0006EF-PL for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Feb 2012 02:27:29 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:36607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rta1u-0006E2-93 for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 02:27:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rta1t-0007wL-1e for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 02:27:26 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rta1s-0007wH-TZ for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 02:27:25 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rta2T-0005yj-Hl for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 02:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Feb 2012 07:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10705-submit@debbugs.gnu.org id=B10705.132834042422763 (code B ref 10705); Sat, 04 Feb 2012 07:28:01 +0000 Original-Received: (at 10705) by debbugs.gnu.org; 4 Feb 2012 07:27:04 +0000 Original-Received: from localhost ([127.0.0.1]:53046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rta1X-0005v5-HW for submit@debbugs.gnu.org; Sat, 04 Feb 2012 02:27:03 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:46554) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rta1U-0005uA-W2 for 10705@debbugs.gnu.org; Sat, 04 Feb 2012 02:27:02 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LYU00500XT8DD00@a-mtaout21.012.net.il> for 10705@debbugs.gnu.org; Sat, 04 Feb 2012 09:26:17 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.139.211]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LYU0053YXZRDF10@a-mtaout21.012.net.il>; Sat, 04 Feb 2012 09:26:16 +0200 (IST) In-reply-to: <87pqdv1mlk.fsf@mail.jurta.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56462 Archived-At: > From: Juri Linkov > Cc: 10705@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.