From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Occur in Word Isearch Date: Sun, 09 Nov 2008 23:09:03 +0200 Organization: JURTA Message-ID: <87skq0mwuk.fsf_-_@jurta.org> References: <87d4h5ew7x.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226265222 23728 80.91.229.12 (9 Nov 2008 21:13:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Nov 2008 21:13:42 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 09 22:14:35 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KzHcA-0008TA-MZ for ged-emacs-devel@m.gmane.org; Sun, 09 Nov 2008 22:14:34 +0100 Original-Received: from localhost ([127.0.0.1]:43891 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzHb3-0006Li-1P for ged-emacs-devel@m.gmane.org; Sun, 09 Nov 2008 16:13:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzHZ2-000492-2d for emacs-devel@gnu.org; Sun, 09 Nov 2008 16:11:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzHYz-00047M-Hz for emacs-devel@gnu.org; Sun, 09 Nov 2008 16:11:18 -0500 Original-Received: from [199.232.76.173] (port=37212 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzHYy-00047E-VS for emacs-devel@gnu.org; Sun, 09 Nov 2008 16:11:17 -0500 Original-Received: from relay02.kiev.sovam.com ([62.64.120.197]:59293) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KzHYy-0001Wm-D4 for emacs-devel@gnu.org; Sun, 09 Nov 2008 16:11:16 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay02.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1KzHYw-000KAW-F3 for emacs-devel@gnu.org; Sun, 09 Nov 2008 23:11:14 +0200 In-Reply-To: <87d4h5ew7x.fsf@jurta.org> (Juri Linkov's message of "Sat, 08 Nov 2008 23:57:34 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: 7ffaa6bc246e67c9b1a22e0c753f4a43 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Trusted X-SpamTest-Info: Profiles 5467 [Oct 22 2008] X-SpamTest-Info: {received from trusted relay: common white list} X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: white ip list X-SpamTest-Rate: 10 X-SpamTest-Status: Trusted X-SpamTest-Status-Extended: trusted X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:105509 Archived-At: `M-s w word M-s o' displays a *Occur* buffer with wrong matches because it takes no care about word boundaries. The following patch should fix this. Index: lisp/isearch.el =================================================================== RCS file: /sources/emacs/emacs/lisp/isearch.el,v retrieving revision 1.331 diff -c -r1.331 isearch.el *** lisp/isearch.el 19 Oct 2008 22:33:17 -0000 1.331 --- lisp/isearch.el 9 Nov 2008 21:07:54 -0000 *************** *** 1384,1390 **** string. NLINES has the same meaning as in `occur'." (interactive (list ! (if isearch-regexp isearch-string (regexp-quote isearch-string)) (if current-prefix-arg (prefix-numeric-value current-prefix-arg)))) (let ((case-fold-search isearch-case-fold-search) ;; set `search-upper-case' to nil to not call --- 1390,1399 ---- string. NLINES has the same meaning as in `occur'." (interactive (list ! (cond ! (isearch-word (concat "\\b" (regexp-quote isearch-string) "\\b")) ! (isearch-regexp isearch-string) ! (t (regexp-quote isearch-string))) (if current-prefix-arg (prefix-numeric-value current-prefix-arg)))) (let ((case-fold-search isearch-case-fold-search) ;; set `search-upper-case' to nil to not call -- Juri Linkov http://www.jurta.org/emacs/