From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#1406: backward-up-list reports scan error incorrectly? Date: Fri, 21 Nov 2008 23:19:44 +0000 Message-ID: <20081121231944.GB2089@muc.de> References: Reply-To: Alan Mackenzie , 1406@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1227310236 7838 80.91.229.12 (21 Nov 2008 23:30:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Nov 2008 23:30:36 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: xah lee , 1406@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 22 00:31:38 2008 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 1L3fTN-0006PK-7h for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 00:31:37 +0100 Original-Received: from localhost ([127.0.0.1]:46335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3fSE-0002hg-2b for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Nov 2008 18:30:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3fS9-0002hC-5R for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 18:30:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3fS8-0002gj-8g for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 18:30:20 -0500 Original-Received: from [199.232.76.173] (port=50315 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3fS7-0002gc-Sz for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 18:30:19 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:47164) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L3fS6-0004zI-RW for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 18:30:19 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mALNU9ML013391; Fri, 21 Nov 2008 15:30:10 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mALNF4nX009179; Fri, 21 Nov 2008 15:15:04 -0800 X-Loop: don@donarmstrong.com Resent-From: Alan Mackenzie Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 21 Nov 2008 23:15:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1406 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1406-submit@emacsbugs.donarmstrong.com id=B1406.12273088227694 (code B ref 1406); Fri, 21 Nov 2008 23:15:04 +0000 Original-Received: (at 1406) by emacsbugs.donarmstrong.com; 21 Nov 2008 23:07:02 +0000 Original-Received: from mail.muc.de (qmailr@colin.muc.de [193.149.48.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mALN6wRH007685 for <1406@emacsbugs.donarmstrong.com>; Fri, 21 Nov 2008 15:07:00 -0800 Original-Received: (qmail 15419 invoked by uid 3782); 21 Nov 2008 23:06:56 -0000 Original-Received: from acm.muc.de (pD9E52D53.dip.t-dialin.net [217.229.45.83]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sat, 22 Nov 2008 00:06:54 +0100 Original-Received: (qmail 9541 invoked by uid 1000); 21 Nov 2008 23:19:44 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 21 Nov 2008 18:30:20 -0500 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:22574 Archived-At: 'Evening, Xah! On Fri, Nov 21, 2008 at 01:24:30PM -0800, xah lee wrote: > This appears to be a bug of backward-up-list. > Summary: when i do backward-up-list in a particular lisp file, when > the cursor is inside a double quote, it tell me Unbalanced > parentheses, but there does not seems to be any unbalanced paren. The > file byte-compiles fine. What do you mean, "the cursor is inside a double quote"? Functions like backward-up-list don't know whether or not they start inside a string or comment; the only way they could find out would be by doing a partial-parse-sexp from some "safe" position earlier on in the file. So these functions assume they're NOT in a string or comment. backward-up-list moves back to the quote mark, and tries to jump over the "string it's just found", possibly taking it to the beginning of the buffer. The bug appears to be in the doc string of the function, which forgets to mention this assumption. If you really, really, need a function which works the way you've pictured, it's not too difficult to write. But it will be SLOW, SLOW, SLOW. -- Alan Mackenzie (Nuremberg, Germany).