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 13:13:54 -0500 Message-ID: <87d13visrh.fsf@users.sourceforge.net> References: <7c208ac0-8aa2-4db8-a38d-760f91c50500@default> <87h8t7ix7m.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1512324916 26359 195.159.176.226 (3 Dec 2017 18:15:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 3 Dec 2017 18:15:16 +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 19:15:08 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 1eLYnA-0006EP-Cb for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Dec 2017 19:15:04 +0100 Original-Received: from localhost ([::1]:39782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLYnH-0002Wt-M6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Dec 2017 13:15:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLYnB-0002Wf-Ts for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 13:15:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLYn8-0005vc-OF for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 13:15:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35037) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eLYn8-0005vY-JT for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 13:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eLYn8-0004Zc-E0 for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2017 13:15: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 18:15: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.151232484417493 (code B ref 24914); Sun, 03 Dec 2017 18:15:02 +0000 Original-Received: (at 24914) by debbugs.gnu.org; 3 Dec 2017 18:14:04 +0000 Original-Received: from localhost ([127.0.0.1]:43717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLYmC-0004Y5-8L for submit@debbugs.gnu.org; Sun, 03 Dec 2017 13:14:04 -0500 Original-Received: from mail-it0-f52.google.com ([209.85.214.52]:41736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLYmB-0004XU-Ct for 24914@debbugs.gnu.org; Sun, 03 Dec 2017 13:14:03 -0500 Original-Received: by mail-it0-f52.google.com with SMTP id x28so7699332ita.0 for <24914@debbugs.gnu.org>; Sun, 03 Dec 2017 10:14:03 -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=zlD3E0XXnNc6fQA7tXrGFqrK2vAVW+/kbEaa5phPIrw=; b=PE0lZEpwbpyS9xLTBBqyZMK5V+yTsWFupkEGaleNUwjmI8vBHJYjmiI0BCnNPV2qtS Wxv3HbfdfpTaI7mJhzuNVTlgIkty5evobmCOX5jQaa4cOCwnvlmDs7eRVTcxS2MiUWrn HSpdhIJHJ8qnBfccD5pnRHizjBVYmD5pHvmZWGrTgINuCcp8gj/Pv6x0rqpZ+tK/1CX6 ak3FkQUUzqNdsQBX0G5tAbIWtWF7jnTEo04CRC9yy+ucfH0+s0LosBvFvmhuYAtWiQTy +E/wfS5RQVs/VtIxDq35m/ZQKCUZILh/isrfvAEHpP5UVHAIDZ/fWkPq82oMjhIdnpMl L/6A== 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=zlD3E0XXnNc6fQA7tXrGFqrK2vAVW+/kbEaa5phPIrw=; b=JQfKVgvlOxxTwa/TEHqRfWKjtj9YTCep06lfoExbehLkNj0kX4m3UMxE70Hw/Hd33y HeBTx1lgEeVklnvp3b8uaOjRbo4ImznzbNV+y87V3D0lYkOctogAlKYnhWW1iVOGyTnh 8Thbnd95tFmihYPTx/fQlp5+1csCr0XMf2SWsK5jUW2Ar2CdnZCq6Tplck/bt3s7S0nj fdBDRKzO5fNSnwfETiL7TL1XFeCLy4tedB/edp/ERHy1gq8bs4K0H95kwC0P/DvI31MW mzqHJT6wQz20keaoauX1lk6t5mQy8iJ1M8vLX2pQX8+dsqAh7xT/eeM1U1GSDBtaiwSL zrRg== X-Gm-Message-State: AJaThX7RkfLqgHLAE0pCDt9n7vcFAFg0DK43ESF2yo9hSrZmcaVtC/CQ jfZHNz9LAm4XUjVjwL/lqsAmqQ== X-Google-Smtp-Source: AGs4zMbFHY5NHHtdiqDouAcqKkJHqpni5bF+3OOuRtg0zu5+SMhjnY1fgsXSfG+Nz6pR4fRjUUYY4w== X-Received: by 10.107.8.140 with SMTP id h12mr20048761ioi.270.1512324837488; Sun, 03 Dec 2017 10:13:57 -0800 (PST) Original-Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id j204sm2811575itj.16.2017.12.03.10.13.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Dec 2017 10:13:56 -0800 (PST) In-Reply-To: (Drew Adams's message of "Sun, 3 Dec 2017 10:00:14 -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:140647 Archived-At: 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). > > 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'? It's not a limit in Lisp, but in regex.c. >> 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. What places are those? > Some code parses the regexp, and that code must know (or be able to > know) both that the regexp is not incomplete 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... > and that the numeral > given for the number of repetitions is too large. 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.