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: Sat, 22 Nov 2008 05:01:10 -0800 Message-ID: <9331FB10-71C6-4B1B-94B6-B5C9B3667B74@xahlee.org> References: <20081121231944.GB2089@muc.de> <5F3AB054-C158-4518-9C93-6938EB2D123D@xahlee.org> <20081122123644.GA3330@muc.de> <12CBE034-485F-49CE-9EF6-2C33A51AF0C1@xahlee.org> 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 1227360136 11572 80.91.229.12 (22 Nov 2008 13:22:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2008 13:22:16 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, 1406@emacsbugs.donarmstrong.com To: xah lee Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 22 14:23:18 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 1L3sS9-000100-SX for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 14:23:14 +0100 Original-Received: from localhost ([127.0.0.1]:45349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3sR0-0000eW-QD for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 08:22:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3sFb-000355-1Y for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 08:10:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3sFZ-000341-9P for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 08:10:13 -0500 Original-Received: from [199.232.76.173] (port=50237 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3sFZ-00033o-4h for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 08:10:13 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:44747) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L3sFY-0005um-Js for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 08:10: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 mAMDAACI003114; Sat, 22 Nov 2008 05:10:10 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAMDA6Be002714; Sat, 22 Nov 2008 05:10:06 -0800 X-Loop: don@donarmstrong.com Resent-From: xah lee Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 22 Nov 2008 13:10:06 +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.1227358847373 (code B ref 1406); Sat, 22 Nov 2008 13:10:06 +0000 Original-Received: (at 1406) by emacsbugs.donarmstrong.com; 22 Nov 2008 13:00:47 +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 mAMD0it5000367 for <1406@emacsbugs.donarmstrong.com>; Sat, 22 Nov 2008 05:00:45 -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-1L3s6I15Xv-0001OD; Sat, 22 Nov 2008 08:00:44 -0500 In-Reply-To: <12CBE034-485F-49CE-9EF6-2C33A51AF0C1@xahlee.org> X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX19GY3MWey0JJc6M8S8VLrpdDUEmlTx0auDY8Y3 UP5g3HsnR+uRgTcwCA1gUKNDxQAsV+fatHDAEPl7mvlVLW678p tE5uhKnzoHDNZVPnQMIKg== X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 22 Nov 2008 08:10:13 -0500 X-Mailman-Approved-At: Sat, 22 Nov 2008 08:21:34 -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:22585 Archived-At: Sorry never mind. i was able to duplicate your error. Some of my testing in previous =20 post went wrong because i was in text-mode. though, isn't this something easy to fix? I mean, it surely is easy =20 to determine if cursor is in inside double quotes, therefore it can =20 simply move out the quote then do backward-up-list? In any case, thanks. Xah =E2=88=91 http://xahlee.org/ =E2=98=84 On Nov 22, 2008, at 4:53 AM, xah lee wrote: hi Alan, > (defun foo (arg) > "foo does nothing." > (interactive "P")) > > Put point inside "P", and do C-M-u `backward-up-list'. You get the > error. i couldn't duplicate this. It seems to work for me. am using GNU Emacs 22.2.1 (powerpc-apple-darwin8.11.0, Carbon Version 1.6.0) =20 of 2008-04-05 on g5.tokyo.stp.isas.jaxa.jp i tried aquamacs. I can duplicate it with -Q, but not with -q. Now i try carbon emacs again with -q, and i _can_ duplicate it. ... umm... not sure what is the problem now... since i'm pretty sure =20 i don't have any customization for emacs-lisp-mode ... am kinda tired now. Maybe i'll do some more testing to see what i =20 find out. Xah =E2=88=91 http://xahlee.org/ =E2=98=84 On Nov 22, 2008, at 4:36 AM, Alan Mackenzie wrote: Hi, Xah! On Fri, Nov 21, 2008 at 03:26:03PM -0800, xah lee wrote: > 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 > this particular case. OK, I think half of the problem here is your prolixity, the other half is my prolixity. :-) Try instead the following example: (defun foo (arg) "foo does nothing." (interactive "P")) Put point inside "P", and do C-M-u `backward-up-list'. You get the error. Now modify the above function by inserting an open paren into the doc string, (defun foo (arg) "foo does nothing. (" (interactive "P")) , and do the same again. It finds that paren. Why? Because backward-up-list assumes its starting point is NOT in a string. It jumps backwards over (what it thinks is) the string "\n(interactive " , and then finds the ?\(. This is exactly what is happening in your somewhat larger example. In text mode, presumably the syntax table doesn't define ?\" as a string quote. In fundamental mode, presumably it does. "(syntax-after (point))" is your friend here. > Xah --=20 Alan Mackenzie (Nuremberg, Germany). =E2=98=84 =E2=98=84