From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#22589: 25.0.90; First match found by isearch-forward-symbol is not necessarily a symbol. Date: Mon, 06 Feb 2017 01:39:13 +0200 Organization: LINKOV.NET Message-ID: <878tpktd1e.fsf@mail.linkov.net> References: <87zivc45j5.fsf@gmail.com> <87d1s8kmyo.fsf@mail.linkov.net> <87io1x5ptd.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486338856 1023 195.159.176.226 (5 Feb 2017 23:54:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 5 Feb 2017 23:54:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) Cc: 22589@debbugs.gnu.org To: Bastian Beischer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 06 00:54:11 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caWdG-0008WL-PX for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Feb 2017 00:54:10 +0100 Original-Received: from localhost ([::1]:44915 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1caWdM-00070T-7w for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Feb 2017 18:54:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1caWdD-000703-Lh for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 18:54:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1caWd8-0007BS-JK for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 18:54:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58809) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1caWd8-0007BH-Gq for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 18:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1caWd8-0000jR-1A for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 18:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Feb 2017 23:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22589 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22589-submit@debbugs.gnu.org id=B22589.14863387892735 (code B ref 22589); Sun, 05 Feb 2017 23:54:01 +0000 Original-Received: (at 22589) by debbugs.gnu.org; 5 Feb 2017 23:53:09 +0000 Original-Received: from localhost ([127.0.0.1]:57003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caWcG-0000i1-KJ for submit@debbugs.gnu.org; Sun, 05 Feb 2017 18:53:08 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:53986 helo=homiemail-a13.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caWcE-0000ho-OV for 22589@debbugs.gnu.org; Sun, 05 Feb 2017 18:53:07 -0500 Original-Received: from homiemail-a13.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a13.g.dreamhost.com (Postfix) with ESMTP id 9E79E334076; Sun, 5 Feb 2017 15:53:05 -0800 (PST) Original-Received: from localhost.linkov.net (m213-100-245-249.cust.tele2.ee [213.100.245.249]) (Authenticated sender: jurta@jurta.org) by homiemail-a13.g.dreamhost.com (Postfix) with ESMTPA id CE66033406C; Sun, 5 Feb 2017 15:53:04 -0800 (PST) In-Reply-To: <87io1x5ptd.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 10 Feb 2016 02:54:54 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:129013 Archived-At: > Then it will match at the beginning of the symbol for a forward search, > and at the end for a backward search. Same for the word search. In bug#25562 we found no more ideas how to improve the support for the process of entering incomplete words, so in addition to the patch in bug#25562 that adds indication, also I'm going to install this patch that will optimize the incomplete search by removing conditional matching at the beginning: diff --git a/lisp/isearch.el b/lisp/isearch.el index 5c48c30..90ffbec 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1621,7 +1621,7 @@ (defun word-search-regexp (string &optional lax) ((string-match-p "\\`\\W+\\'" string) "\\W+") (t (concat (if (string-match-p "\\`\\W" string) "\\W+" - (unless lax "\\<")) + "\\<") (mapconcat 'regexp-quote (split-string string "\\W+" t) "\\W+") (if (string-match-p "\\W\\'" string) "\\W+" (unless lax "\\>")))))) @@ -1749,7 +1749,7 @@ (defun isearch-symbol-regexp (string &optional lax) ((string-match-p (format "\\`%s\\'" not-word-symbol-re) string) not-word-symbol-re) (t (concat (if (string-match-p (format "\\`%s" not-word-symbol-re) string) not-word-symbol-re - (unless lax "\\_<")) + "\\_<") (mapconcat 'regexp-quote (split-string string not-word-symbol-re t) not-word-symbol-re) (if (string-match-p (format "%s\\'" not-word-symbol-re) string) not-word-symbol-re (unless lax "\\_>")))))))