From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: Re: parentheses matching failure on valid sexp Date: Tue, 11 Sep 2007 08:55:28 -0400 Message-ID: References: <86fy1lojua.fsf@macs.hw.ac.uk> <46E639B1.6010105@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1189515350 16210 80.91.229.12 (11 Sep 2007 12:55:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Sep 2007 12:55:50 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, Joe Wells To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 11 14:55:47 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IV5HE-00020Q-74 for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Sep 2007 14:55:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IV5HE-0007Mw-De for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Sep 2007 08:55:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IV5HC-0007LJ-Sa for bug-gnu-emacs@gnu.org; Tue, 11 Sep 2007 08:55:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IV5H9-0007GJ-02 for bug-gnu-emacs@gnu.org; Tue, 11 Sep 2007 08:55:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IV5H8-0007G2-Jz for bug-gnu-emacs@gnu.org; Tue, 11 Sep 2007 08:55:30 -0400 Original-Received: from tomts36.bellnexxia.net ([209.226.175.93] helo=tomts36-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IV5H8-0007VT-6i for bug-gnu-emacs@gnu.org; Tue, 11 Sep 2007 08:55:30 -0400 Original-Received: from pastel.home ([70.55.141.227]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070911125529.GJBR7033.tomts36-srv.bellnexxia.net@pastel.home> for ; Tue, 11 Sep 2007 08:55:29 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 001AB856D; Tue, 11 Sep 2007 08:55:28 -0400 (EDT) In-Reply-To: <46E639B1.6010105@gmx.at> (martin rudalics's message of "Tue\, 11 Sep 2007 08\:46\:09 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Detected-Kernel: Solaris 8 (1) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16539 Archived-At: >> This bug is sensitive to the size of the input. If you delete much of >> the input, then the bug goes away. > Emacs reports a bug because the matching left paren is more than > `blink-matching-paren-distance' characters before the right one. The > message will go away if you customize that variable accordingly. > It might be worth looking at the syntax-ppss cache for paren matching. > I know, the paren matching algorithms usually find a matching paren > within a few characters distance and there's no profound reason to do > that. But when font-locking is on, the cache contains the position of > all open parens for some line-beginning before point anyway. Hence, we > could look for an opening paren within one or two lines and consult the > cache if we didn't find anything useful there. In this case we could > ignore `blink-matching-paren-distance'. Stefan what do you think? I'm not sure syntax-ppss is such a great idea here. I mean, maybe it'll work, but we may as well just set `blink-matching-paren-distance' to nil. The only time it's a problem is when you bump into an extraneous close paren, in which case Emacs will scan all the way to the beginning of the buffer. But even then: unless your buffer is 200MB long, this is still almost instantaneous, so it seems acceptable. Stefan