From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.50; find-library scan-error "Unbalanced parenthesis" Date: Thu, 24 Jan 2008 08:59:42 +0100 Message-ID: <4798456E.9080607@gmx.at> References: <4797D6C5.70807@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020406060606040200030407" X-Trace: ger.gmane.org 1201166029 20981 80.91.229.12 (24 Jan 2008 09:13:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Jan 2008 09:13:49 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: "Lennart Borgman (gmail)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 24 10:14:08 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JHy9w-0006UZ-3m for ged-emacs-devel@m.gmane.org; Thu, 24 Jan 2008 10:14:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JHy9V-0002L1-4H for ged-emacs-devel@m.gmane.org; Thu, 24 Jan 2008 04:13:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JHxvS-0007Lq-EG for emacs-devel@gnu.org; Thu, 24 Jan 2008 03:59:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JHxvP-0007L0-Gn for emacs-devel@gnu.org; Thu, 24 Jan 2008 03:59:09 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JHxvO-0007KW-FA for emacs-devel@gnu.org; Thu, 24 Jan 2008 03:59:06 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JHxvO-0007I2-2H for emacs-devel@gnu.org; Thu, 24 Jan 2008 03:59:06 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JHxvN-00029x-Ni for emacs-pretest-bug@gnu.org; Thu, 24 Jan 2008 03:59:05 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JHxvK-0007HF-IU for emacs-pretest-bug@gnu.org; Thu, 24 Jan 2008 03:59:05 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JHxvK-0007Gz-5K for emacs-pretest-bug@gnu.org; Thu, 24 Jan 2008 03:59:02 -0500 Original-Received: (qmail invoked by alias); 24 Jan 2008 07:59:01 -0000 Original-Received: from N792P007.adsl.highway.telekom.at (EHLO [62.47.42.231]) [62.47.42.231] by mail.gmx.net (mp029) with SMTP; 24 Jan 2008 08:59:01 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX188m+oUqM08a0jFxuxuLXD26wFlDQR8SQFMk6CERK otoCmoYoRhpakF User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <4797D6C5.70807@gmail.com> X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87429 gmane.emacs.pretest.bugs:20739 Archived-At: This is a multi-part message in MIME format. --------------020406060606040200030407 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > Here is a simple bug - I believe. I get the error > > error: (scan-error "Unbalanced parentheses" 344 1) > > from find-libary > > To reproduce do > > emacs -Q > > Paste these lines in the scratch buffer > > ;;(add-to-list 'load-path "c:/DL/emacs/org-5.13h/org-5.13h/") > ;;(require 'org-install) > > Place cursor at beginning of second line and do > > M-x find-library RET The bug occurs (also) because `function-called-at-point' is a misnomer. `find-tag-default' is allowed to return a symbol somewhere on the current line. `find-library' assumes that the "require" is right there at point and tries to get out of a non-existent list. You can reproduce a similar bug by putting point on the "require" in the top-level string below when invoking `find-library': "require 'org-install" Hence there is a bug with `find-library' itself. Let's wrap this in a simple `condition-case'. --------------020406060606040200030407 Content-Type: text/plain; name="find-func.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="find-func.patch" *** find-func.el.~1.83.~ Wed Oct 31 13:39:44 2007 --- find-func.el Thu Jan 24 08:51:58 2008 *************** *** 195,205 **** (let* ((path (cons (or find-function-source-path load-path) (find-library-suffixes))) (def (if (eq (function-called-at-point) 'require) ! (save-excursion ! (backward-up-list) ! (forward-char) ! (backward-sexp -2) ! (thing-at-point 'symbol)) (thing-at-point 'symbol)))) (when def (setq def (and (locate-file-completion def path 'test) def))) --- 195,207 ---- (let* ((path (cons (or find-function-source-path load-path) (find-library-suffixes))) (def (if (eq (function-called-at-point) 'require) ! (condition-case nil ! (save-excursion ! (backward-up-list) ! (forward-char) ! (backward-sexp -2) ! (thing-at-point 'symbol)) ! (error nil)) (thing-at-point 'symbol)))) (when def (setq def (and (locate-file-completion def path 'test) def))) --------------020406060606040200030407 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------020406060606040200030407--