From: Juri Linkov <juri@linkov.net>
To: Dima Kogan <dima@secretsauce.net>
Cc: 21208@debbugs.gnu.org
Subject: bug#21208: 25.0.50; isearch gets confused with 'too many words'
Date: Fri, 04 Sep 2015 01:27:30 +0300 [thread overview]
Message-ID: <8737yvm94d.fsf@mail.linkov.net> (raw)
In-Reply-To: <87wpx75r6j.fsf@secretsauce.net> (Dima Kogan's message of "Fri, 07 Aug 2015 03:27:48 -0700")
> 6. Eventually (column 239 or so) the minibuffer says 'too many words',
> and the search no longer matches anything on either line. The sought
> string looks like it's appending words without spaces ("123412341234"
> instead of "1234 1234 1234"). Manually fixing that with M-e doesn't
> appear to help.
A possible solution in case of the error “Too many words” is to fall back
to the ordinary search, and continue the search with success:
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 8d4bf24..a888f79 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2720,6 +2734,10 @@ (defun isearch-search ()
((and (not isearch-regexp)
(string-match "\\`Regular expression too big" isearch-error))
(cond
+ ((eq isearch-word #'character-fold-to-regexp)
+ ;; Fallback to an ordinary search
+ (setq isearch-word nil)
+ (isearch-search))
(isearch-word
(setq isearch-error "Too many words"))
((and isearch-lax-whitespace search-whitespace-regexp)
next prev parent reply other threads:[~2015-09-03 22:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-07 10:27 bug#21208: 25.0.50; isearch gets confused with 'too many words' Dima Kogan
2015-09-03 22:27 ` Juri Linkov [this message]
2016-06-11 2:34 ` Noam Postavsky
[not found] <mailman.7939.1438961528.904.bug-gnu-emacs@gnu.org>
[not found] ` <mailman.7939.1438961528.904.bug-gnu-emacs-mXXj517/zsQ@public.gmane.org>
2015-08-07 20:40 ` Sebastien Vauban
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=8737yvm94d.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=21208@debbugs.gnu.org \
--cc=dima@secretsauce.net \
/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.