From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#15166: 24.3.50; Isearch for an octal code Date: Tue, 27 Aug 2013 18:58:45 +0300 Organization: JURTA Message-ID: <87txibm8ga.fsf@mail.jurta.org> References: <87d2p4ovyn.fsf@mail.jurta.org> <8738pzmo4s.fsf@mail.jurta.org> <0bbc13a6-a62d-4b2a-8608-3b84d45303f2@default> <87d2p2d5h3.fsf@mail.jurta.org> <1d57c871-b16e-48b5-acaf-bd628188f119@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1377619230 15605 80.91.229.3 (27 Aug 2013 16:00:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 Aug 2013 16:00:30 +0000 (UTC) Cc: 15166-done@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 27 18:00:32 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VELh0-0000fa-N8 for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Aug 2013 18:00:30 +0200 Original-Received: from localhost ([::1]:57261 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VELh0-0004Pd-BT for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Aug 2013 12:00:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VELgp-0004Cf-4l for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2013 12:00:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VELgj-0004mK-5c for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2013 12:00:19 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VELgj-0004mF-21 for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2013 12:00:13 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VELgi-0000iE-Bf for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2013 12:00:12 -0400 Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Aug 2013 16:00:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 15166 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 15166@debbugs.gnu.org, juri@jurta.org, dmoncayo@gmail.com Original-Received: via spool by 15166-done@debbugs.gnu.org id=D15166.13776192042716 (code D ref 15166); Tue, 27 Aug 2013 16:00:06 +0000 Original-Received: (at 15166-done) by debbugs.gnu.org; 27 Aug 2013 16:00:04 +0000 Original-Received: from localhost ([127.0.0.1]:59346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VELgY-0000hY-BQ for submit@debbugs.gnu.org; Tue, 27 Aug 2013 12:00:03 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:49762 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VELgU-0000gv-48 for 15166-done@debbugs.gnu.org; Tue, 27 Aug 2013 11:59:59 -0400 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 62CC4258B9E935; Tue, 27 Aug 2013 08:59:56 -0700 (PDT) In-Reply-To: (Dani Moncayo's message of "Tue, 27 Aug 2013 11:59:13 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:77769 Archived-At: > 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)