GNU bug report logs - #21208
25.0.50; isearch gets confused with 'too many words'

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Fri, 7 Aug 2015 15:32:01 UTC

Severity: normal

Tags: unreproducible

Found in version 25.0.50

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #11 received at 21208 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 21208 <at> debbugs.gnu.org
Subject: Re: bug#21208: 25.0.50; isearch gets confused with 'too many words'
Date: Fri, 04 Sep 2015 01:27:30 +0300
> 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)




This bug report was last modified 8 years and 111 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.