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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21208 in the body.
You can then email your comments to 21208 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#21208; Package emacs. (Fri, 07 Aug 2015 15:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dima Kogan <dima <at> secretsauce.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 07 Aug 2015 15:32:02 GMT) Full text and rfc822 format available.

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

From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; isearch gets confused with 'too many words'
Date: Fri, 07 Aug 2015 03:27:48 -0700
Hi. I'm running a very recent build of emacs from git:

  https://github.com/emacs-mirror/emacs/commit/0aec2aaccd8b745fa7214f3edd453c04a04bfba4

I just found another isearch regression. Recipe:

1. emacs -Q

2. Create or open file such that the buffer contains
-------------------------
1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234

1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
-------------------------
i.e two identical long lines containing lots of words '1234'.

3. Point to start of buffer

4. C-s

5. C-w multiple times. As you press C-w, you grow the string being
sought; you can see the match highlighted on the line being selected and
on the next line

4. 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.







Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21208; Package emacs. (Fri, 07 Aug 2015 20:41:02 GMT) Full text and rfc822 format available.

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

From: Sebastien Vauban <sva-news <at> mygooglest.com>
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, 07 Aug 2015 22:40:31 +0200
Dima Kogan <dima <at> secretsauce.net> writes:
> Hi. I'm running a very recent build of emacs from git:
>
>   https://github.com/emacs-mirror/emacs/commit/0aec2aaccd8b745fa7214f3edd453c04a04bfba4
>
> I just found another isearch regression. Recipe:
>
> 1. emacs -Q
>
> 2. Create or open file such that the buffer contains
> -------------------------
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
>
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
> -------------------------
> i.e two identical long lines containing lots of words '1234'.
>
> 3. Point to start of buffer
>
> 4. C-s
>
> 5. C-w multiple times. As you press C-w, you grow the string being
> sought; you can see the match highlighted on the line being selected and
> on the next line
>
> 4. 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.

Confirmed -- was about to report it as well!

Best regards,
  Seb




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21208; Package emacs. (Thu, 03 Sep 2015 22:32:01 GMT) Full text and rfc822 format available.

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)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21208; Package emacs. (Sat, 11 Jun 2016 02:35:02 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: 21208 <at> debbugs.gnu.org
Cc: Sebastien Vauban <sva-news <at> mygooglest.com>,
 Dima Kogan <dima <at> secretsauce.net>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#21208: 25.0.50; isearch gets confused with 'too many words'
Date: Fri, 10 Jun 2016 22:34:43 -0400
tag 21208 + unreproducible
quit

I can't reproduce this in 25.0.94, is it fixed?




Added tag(s) unreproducible. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Sat, 11 Jun 2016 02:35:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 21208 <at> debbugs.gnu.org and Dima Kogan <dima <at> secretsauce.net> Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 25 Mar 2017 23:12:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 23 Apr 2017 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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