From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#24914: 24.5; isearch-regexp: wrong error message Date: Sun, 03 Dec 2017 11:37:49 -0500 Message-ID: <87h8t7ix7m.fsf@users.sourceforge.net> References: <7c208ac0-8aa2-4db8-a38d-760f91c50500@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1512319099 17728 195.159.176.226 (3 Dec 2017 16:38:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 3 Dec 2017 16:38:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: 24914@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 03 17:38:11 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLXHM-00045D-3Y for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Dec 2017 17:38:08 +0100 Original-Received: from localhost ([::1]:39463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLXHT-00030v-7w for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Dec 2017 11:38:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLXHJ-0002ql-P9 for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 11:38:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLXHG-0006sz-JW for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 11:38:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34940) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eLXHG-0006si-F7 for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 11:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eLXHG-0000NY-95 for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 11:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Dec 2017 16:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24914 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 24914-submit@debbugs.gnu.org id=B24914.15123190811443 (code B ref 24914); Sun, 03 Dec 2017 16:38:02 +0000 Original-Received: (at 24914) by debbugs.gnu.org; 3 Dec 2017 16:38:01 +0000 Original-Received: from localhost ([127.0.0.1]:43619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLXHF-0000NC-9n for submit@debbugs.gnu.org; Sun, 03 Dec 2017 11:38:01 -0500 Original-Received: from mail-io0-f171.google.com ([209.85.223.171]:40443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLXHB-0000Mr-K6 for 24914@debbugs.gnu.org; Sun, 03 Dec 2017 11:37:58 -0500 Original-Received: by mail-io0-f171.google.com with SMTP id d21so16131059ioe.7 for <24914@debbugs.gnu.org>; Sun, 03 Dec 2017 08:37:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=rCEHL4zLE9HKYes0QF4yLAFjh+d1XgnmZxVUzE74zok=; b=FenRGUTvvq4V1GLwadf2d/BInPiTJMGmnE91yvgRBMNBcIeNb1RXPzL67ywyy6SCnv 32sQdSlxTFgQvJ1wuZSSW41KFyyijf81SHFqLZKiO2HQ/tbu4e7TZ1QMHGnRfoZ1lB51 FxXppN2a64tmBnyrV1YXCcpcsyQvOhgFTT9KOCSaEdzfEOXpBfB0wt/3mfP1OwPBMniw JmCG+cSxdWBpyK/Jf+s1vQtn2hKN/TxPTu1aAjH6oX1qPEXf7GywWZlMcGPPMpkeFbzj i0mwGDzmfGWp1AQ5r1WnjrHLECZhpBOq0WEi17Qxu6W4e83UigtOpJMpBtM2qqUeR6DD yGcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=rCEHL4zLE9HKYes0QF4yLAFjh+d1XgnmZxVUzE74zok=; b=s/3EZ3ssLZ8T3/YJNAJuMIbRGbXSFISF75X6z6xFTYmUIHl/TUwNbEJoiY0MembsiP x//rONTXLBsac5/0Z2JqdbeyfBEjJWOZUhamgr+bbOt6n4N1uZQ1+awSiLAWAjEju9bi 2SraMklTV6SHa+1iTcxWvPIG/QCMKtULHgKc9pQBob1AKZqNucjJAfjEK0Hp+CrFwrq5 937fYCAuCy+W9ppdslnnxAoiUT7/AoovvHxlfS0GtB1MODto9R+Hih9pKnkMHT1L8zwX 9QX5vlhUkHjt6fu3/aWDYoGjsnx/jadejxBUC+TB/BvhtXWyGfwmJHbglJBZ2Fo5oZDh tp/g== X-Gm-Message-State: AJaThX5Rfrbt9PLX4XTZLJlhXmE0Kc4s/sOEXWQIvN2n+fLroAUjlXkU SStUOXtmXwa5XAOGuWJYnpId5A== X-Google-Smtp-Source: AGs4zMYxWRnwSNlJdUn5gvh8Wj0sb55wHtdITCCRG25WHt13bMoPWTYvTY3tUYUeFb+8YFnNRYcN8w== X-Received: by 10.107.7.75 with SMTP id 72mr22365119ioh.14.1512319071793; Sun, 03 Dec 2017 08:37:51 -0800 (PST) Original-Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id 76sm2751818itk.23.2017.12.03.08.37.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Dec 2017 08:37:50 -0800 (PST) In-Reply-To: <7c208ac0-8aa2-4db8-a38d-760f91c50500@default> (Drew Adams's message of "Wed, 9 Nov 2016 14:29:45 -0800 (PST)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:140642 Archived-At: --=-=-= Content-Type: text/plain Drew Adams writes: > 3. C-M-s \(.\|^J\)\{,40000\} > > That shows the error message: [incomplete input], which is wrong, IMO. The reason it doesn't work is because the number of repitions is limited to 32767 (#x7fff). Obviously that should be documented in the manual. As to the error message itself, there isn't really a way to distinguish between incomplete and invalid input, so the only thing I can see to do is to change the message to [incomplete or invalid input]. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Document-limitation-of-regexp-repetition-Bug-24914.patch Content-Description: patch >From f7bb728281408170cfe79005b03d2b382a84cdbd Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 2 Dec 2017 19:01:54 -0500 Subject: [PATCH] Document limitation of regexp repetition (Bug#24914) * doc/lispref/searching.texi (Regexp Backslash): Explain that \{m,n\} may only use numbers up to 32767. * lisp/isearch.el (isearch-search): Update error message to include invalid input possibility. --- doc/lispref/searching.texi | 3 ++- lisp/isearch.el | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 755fa554bb..92b7e6d17e 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -639,7 +639,8 @@ Regexp Backslash is a more general postfix operator that specifies repetition with a minimum of @var{m} repeats and a maximum of @var{n} repeats. If @var{m} is omitted, the minimum is 0; if @var{n} is omitted, there is no -maximum. +maximum. For both forms, @var{m} and @var{n}, if specified, may be no +larger than 32767. For example, @samp{c[ad]\@{1,2\@}r} matches the strings @samp{car}, @samp{cdr}, @samp{caar}, @samp{cadr}, @samp{cdar}, and @samp{cddr}, and diff --git a/lisp/isearch.el b/lisp/isearch.el index 13fa97ea71..dfc5f9f3f7 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2853,7 +2853,7 @@ isearch-search ((string-match "\\`Premature \\|\\`Unmatched \\|\\`Invalid " isearch-error) - (setq isearch-error "incomplete input")) + (setq isearch-error "incomplete or invalid input")) ((and (not isearch-regexp) (string-match "\\`Regular expression too big" isearch-error)) (cond -- 2.11.0 --=-=-=--