* bug#21208: 25.0.50; isearch gets confused with 'too many words'
[not found] ` <mailman.7939.1438961528.904.bug-gnu-emacs-mXXj517/zsQ@public.gmane.org>
@ 2015-08-07 20:40 ` Sebastien Vauban
0 siblings, 0 replies; 4+ messages in thread
From: Sebastien Vauban @ 2015-08-07 20:40 UTC (permalink / raw)
To: Dima Kogan; +Cc: 21208-ubl+/3LiMTaZdePnXv/OxA
Dima Kogan <dima-8Bn8oVo35dduSJGsrdOfxA@public.gmane.org> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21208: 25.0.50; isearch gets confused with 'too many words'
@ 2015-08-07 10:27 Dima Kogan
2015-09-03 22:27 ` Juri Linkov
2016-06-11 2:34 ` Noam Postavsky
0 siblings, 2 replies; 4+ messages in thread
From: Dima Kogan @ 2015-08-07 10:27 UTC (permalink / raw)
To: 21208
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21208: 25.0.50; isearch gets confused with 'too many words'
2015-08-07 10:27 Dima Kogan
@ 2015-09-03 22:27 ` Juri Linkov
2016-06-11 2:34 ` Noam Postavsky
1 sibling, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2015-09-03 22:27 UTC (permalink / raw)
To: Dima Kogan; +Cc: 21208
> 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)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#21208: 25.0.50; isearch gets confused with 'too many words'
2015-08-07 10:27 Dima Kogan
2015-09-03 22:27 ` Juri Linkov
@ 2016-06-11 2:34 ` Noam Postavsky
1 sibling, 0 replies; 4+ messages in thread
From: Noam Postavsky @ 2016-06-11 2:34 UTC (permalink / raw)
To: 21208; +Cc: Sebastien Vauban, Dima Kogan, Juri Linkov
tag 21208 + unreproducible
quit
I can't reproduce this in 25.0.94, is it fixed?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-11 2:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 ` bug#21208: 25.0.50; isearch gets confused with 'too many words' Sebastien Vauban
2015-08-07 10:27 Dima Kogan
2015-09-03 22:27 ` Juri Linkov
2016-06-11 2:34 ` Noam Postavsky
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.