From: Juri Linkov <juri@linkov.net>
To: Bastian Beischer <bastian.beischer@gmail.com>
Cc: 22589@debbugs.gnu.org
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 [thread overview]
Message-ID: <878tpktd1e.fsf@mail.linkov.net> (raw)
In-Reply-To: <87io1x5ptd.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 10 Feb 2016 02:54:54 +0200")
> 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 "\\_>")))))))
next prev parent reply other threads:[~2017-02-05 23:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-07 20:41 bug#22589: 25.0.90; First match found by isearch-forward-symbol is not necessarily a symbol Bastian Beischer
2016-02-08 0:09 ` Bastian Beischer
2016-02-08 0:54 ` Juri Linkov
2016-02-08 11:30 ` Michael Heerdegen
2016-02-10 0:55 ` Juri Linkov
2016-02-10 11:30 ` Michael Heerdegen
2016-02-08 11:34 ` Bastian Beischer
2016-02-10 0:54 ` Juri Linkov
2017-02-05 23:39 ` Juri Linkov [this message]
2017-02-06 11:10 ` Michael Heerdegen
2017-02-07 0:11 ` Juri Linkov
2017-02-07 19:19 ` Michael Heerdegen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878tpktd1e.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=22589@debbugs.gnu.org \
--cc=bastian.beischer@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.