From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: xah lee Newsgroups: gmane.emacs.bugs Subject: bug#1406: backward-up-list reports scan error incorrectly? Date: Fri, 21 Nov 2008 15:26:03 -0800 Message-ID: <5F3AB054-C158-4518-9C93-6938EB2D123D@xahlee.org> References: <20081121231944.GB2089@muc.de> Reply-To: xah lee , 1406@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1227347709 13838 80.91.229.12 (22 Nov 2008 09:55:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2008 09:55:09 +0000 (UTC) Cc: 1406@emacsbugs.donarmstrong.com, bug-gnu-emacs@gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 22 10:56:10 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 1L3pDl-00014t-G3 for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 10:56:09 +0100 Original-Received: from localhost ([127.0.0.1]:36302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3pCc-0005sO-IL for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 04:54:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3flO-0001Yn-NO for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 18:50:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3flM-0001Y2-W9 for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 18:50:14 -0500 Original-Received: from [199.232.76.173] (port=49863 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3flM-0001Xv-O7 for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 18:50:12 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46265) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L3flM-0006Ld-FU for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 18:50:12 -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 mALNo9Rl018877; Fri, 21 Nov 2008 15:50:10 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mALNZ4dm014297; Fri, 21 Nov 2008 15:35:04 -0800 X-Loop: don@donarmstrong.com Resent-From: xah lee Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 21 Nov 2008 23:35: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.122730995612777 (code B ref 1406); Fri, 21 Nov 2008 23:35:04 +0000 Original-Received: (at 1406) by emacsbugs.donarmstrong.com; 21 Nov 2008 23:25:56 +0000 Original-Received: from mout.perfora.net (mout.perfora.net [74.208.4.197]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mALNPrlw012771 for <1406@emacsbugs.donarmstrong.com>; Fri, 21 Nov 2008 15:25:54 -0800 Original-Received: from [192.168.1.5] (c-24-6-185-159.hsd1.ca.comcast.net [24.6.185.159]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1L3fNj0UmN-0001Bg; Fri, 21 Nov 2008 18:25:50 -0500 In-Reply-To: <20081121231944.GB2089@muc.de> X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX183G075W+ZEtiXCuUwPOm5Sx6poqlfrMLjRVyP efjYuN0L/zJ2LN/PH9LvX6HwMZXTG6Pv7MJ4UKD4bWcq7OC3w1 AQs2xuhTq6zoHCnDDRXag== X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 21 Nov 2008 18:50:14 -0500 X-Mailman-Approved-At: Sat, 22 Nov 2008 04:54:53 -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:22582 Archived-At: Hi Alan, it works if you switch to text mode though. It doesn't work while in emacs-lisp-mode and fundamental mode. In any case, normally it works when inside string too. Just not in =20 this particular case. Xah =E2=88=91 http://xahlee.org/ =E2=98=84 On Nov 21, 2008, at 3:19 PM, Alan Mackenzie wrote: '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 =20= 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 =20 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. --=20 Alan Mackenzie (Nuremberg, Germany). =E2=98=84