From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#24914: 24.5; isearch-regexp: wrong error message Date: Sun, 3 Dec 2017 10:56:32 -0800 (PST) Message-ID: References: <7c208ac0-8aa2-4db8-a38d-760f91c50500@default> <87h8t7ix7m.fsf@users.sourceforge.net> <87d13visrh.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1512327440 1155 195.159.176.226 (3 Dec 2017 18:57:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 3 Dec 2017 18:57:20 +0000 (UTC) Cc: 24914@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 03 19:57:10 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 1eLZRr-0007pX-RE for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Dec 2017 19:57:08 +0100 Original-Received: from localhost ([::1]:39864 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLZRv-0006yQ-QC for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Dec 2017 13:57:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLZRp-0006oR-EY for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 13:57:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLZRm-0002G1-DH for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 13:57:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35078) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eLZRm-0002FN-7B for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 13:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eLZRl-0005bb-Tr for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 13:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Dec 2017 18:57:01 +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.151232740421521 (code B ref 24914); Sun, 03 Dec 2017 18:57:01 +0000 Original-Received: (at 24914) by debbugs.gnu.org; 3 Dec 2017 18:56:44 +0000 Original-Received: from localhost ([127.0.0.1]:43759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLZRT-0005b2-1x for submit@debbugs.gnu.org; Sun, 03 Dec 2017 13:56:44 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:38946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLZRQ-0005am-Mt for 24914@debbugs.gnu.org; Sun, 03 Dec 2017 13:56:41 -0500 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vB3Igt6V103450; Sun, 3 Dec 2017 18:56:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=d5Ydzsbs6D3/8x5dGvdaXi8qzkdQmWWJGkyDkv9b4KI=; b=KDruA7Y5QcMUObLFiOoJBnB5UFyCZxBrdLIXwmGGzVFT+Ghhfr2n4OoLoHPDCJu6kDM2 3WSsY6qjdysKHgl2/9S1PSyhl0w19Z5eub3Ae79PJnWNOcesVEgzWvz4VgjlxDy/9gWv HkWVfZVHdL7zZqnl9/cxHggcSwE0UdhCsMIdd+ozL2Y50L3BLCZ7U+Bvm7zmvQZFEa+h 5PznolZWoasOmQlqWdQvVX+Zpz8u2naWJbtrrKlisLbKilPHS7DSvY5QVzXZtS6RSmt3 WlIqjyCepeUbKtZGfZ+LO/Wi/szIsPAlSkhuRzdiiVWMMjAwigMK/vAf/PiXw5uWLIrj pA== Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2ekpeuhjdr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 03 Dec 2017 18:56:34 +0000 Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id vB3IuXev004628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 3 Dec 2017 18:56:34 GMT Original-Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id vB3IuXRA031390; Sun, 3 Dec 2017 18:56:33 GMT In-Reply-To: <87d13visrh.fsf@users.sourceforge.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4615.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8734 signatures=668637 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712030285 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:140649 Archived-At: > >> > 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). > > > > Yet another case for adding bignums to Emacs Lisp? > > I imagine someone will answer that there needs to be > > a limit. > > > > In that case, can we not use something larger? > > Could we use the value of `most-positive-fixnum'? >=20 > It's not a limit in Lisp, but in regex.c. We can't use something larger there? > >> As to the error message itself, there isn't really a way > >> to distinguish between incomplete and invalid input, > > > > We do that in some places in the code. >=20 > What places are those? In the Lisp code, at least, there are a few places where we provide an error that is specific to an invalid regexp. Search for handling of standard error `invalid-regexp', for instance. But if this is handled only in C code then you might want to look there instead. > > Some code parses the regexp, and that code must know (or be able to > > know) both that the regexp is not incomplete >=20 > What does it mean for a regexp to be incomplete or not? As far as I can > tell, the only distinction is that the user means to type more; but the > code doesn't know what will happen in the future... Presumably that term is used only for cases where we can be sure that in order for the regexp to be valid there would need to be further input. `foo' is not incomplete, whether or not the user "means to type more". `[^' is incomplete, because it can be made valid only by typing more. > > and that the numeral > > given for the number of repetitions is too large. >=20 > I suppose we could change regex.c to give a different error message for > a repetition number that is too high, and then isearch.el could check > for that specially. That would be great.