GNU bug report logs - #15166
24.3.50; Isearch for an octal code

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Dani Moncayo <dmoncayo <at> gmail.com>
Subject: bug#15166: closed (Re: bug#15166: 24.3.50; Isearch for an octal code)
Date: Tue, 27 Aug 2013 16:00:13 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#15166: 24.3.50; Isearch for an octal code

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 15166 <at> debbugs.gnu.org.

-- 
15166: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15166
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Juri Linkov <juri <at> jurta.org>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 15166-done <at> debbugs.gnu.org
Subject: Re: bug#15166: 24.3.50; Isearch for an octal code
Date: Tue, 27 Aug 2013 18:58:45 +0300
> 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)


[Message part 3 (message/rfc822, inline)]
From: Dani Moncayo <dmoncayo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; Isearch for an octal code
Date: Fri, 23 Aug 2013 13:23:10 +0200
Recipe from "emacs -Q":
  C-q 2 0 0 RET M-< C-s C-q 2 0 0 RET

I observe that Isearch fails; it's unable to find the character with
octal code `200'.

Why?  It should be able, no?


In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-08-22 on LEG570
Bzr revision: 113971 monnier <at> iro.umontreal.ca-20130822040645-0fc4fi87eir72jnb
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr --enable-checking CFLAGS='-O0 -g3'
 CPPFLAGS='-DGLYPH_DEBUG=1 -I/c/usr/include''

Important settings:
  value of $LANG: ESN
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

-- 
Dani Moncayo



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.