GNU bug report logs -
#15166
24.3.50; Isearch for an octal code
Previous Next
Reported by: Dani Moncayo <dmoncayo <at> gmail.com>
Date: Fri, 23 Aug 2013 11:24:02 UTC
Severity: normal
Found in version 24.3.50
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #37 received at 15166-done <at> debbugs.gnu.org (full text, mbox):
> It seems that everything is already clear regarding your two patches,
> no? (they are both fine).
>
> So, how about committing them?
I committed the patch that fixes the bug reported by you.
Thanks for the bug report.
But I left unchanged the comment about `C-q SPC' for the
chance if someone will have inclination to make it work in
non-regexp mode somehow, because internally they both use regexps.
You can see the internal regexp matching by typing too many spaces
in non-regexp mode, and Isearch will report the error
"Regular expression too big".
This error message is confusing in non-regexp Isearch.
So I propose another patch to make the error message
more suitable to whitespace-matching non-regexp mode.
And since regexp-based word-search mode reports the same
confusing error message when there are too many words
in the search string, it should be fixed as well:
=== modified file 'lisp/isearch.el'
--- lisp/isearch.el 2013-08-08 23:59:14 +0000
+++ lisp/isearch.el 2013-08-27 15:58:01 +0000
@@ -2773,10 +2777,18 @@ (defun isearch-search ()
(invalid-regexp
(setq isearch-error (car (cdr lossage)))
- (if (string-match
- "\\`Premature \\|\\`Unmatched \\|\\`Invalid "
- isearch-error)
- (setq isearch-error "incomplete input")))
+ (cond
+ ((string-match
+ "\\`Premature \\|\\`Unmatched \\|\\`Invalid "
+ isearch-error)
+ (setq isearch-error "incomplete input"))
+ ((and (not isearch-regexp)
+ (string-match "\\`Regular expression too big" isearch-error))
+ (cond
+ (isearch-word
+ (setq isearch-error "Too many words"))
+ ((and isearch-lax-whitespace search-whitespace-regexp)
+ (setq isearch-error "Too many spaces for whitespace matching"))))))
(search-failed
(setq isearch-success nil)
This bug report was last modified 11 years and 270 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.