From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Noah Friedman Newsgroups: gmane.emacs.devel Subject: read-file-name error-handling problem Date: Sat, 10 Aug 2002 10:40:19 -0700 (PDT) Sender: emacs-devel-admin@gnu.org Message-ID: <20020810104019.961801.FMU3842@piglet.prv.splode.com> Reply-To: Noah Friedman NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Mafia/Steve-Case/Crypto-AG/Serbian/illuminati/vCVDrFoV5S" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1029001225 3389 127.0.0.1 (10 Aug 2002 17:40:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 10 Aug 2002 17:40:25 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17daDw-0000sY-00 for ; Sat, 10 Aug 2002 19:40:24 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17dab6-0002xq-00 for ; Sat, 10 Aug 2002 20:04:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17daEk-0006J6-00; Sat, 10 Aug 2002 13:41:14 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17daDz-0006Ce-00 for emacs-devel@gnu.org; Sat, 10 Aug 2002 13:40:27 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17daDx-0006CS-00 for emacs-devel@gnu.org; Sat, 10 Aug 2002 13:40:26 -0400 Original-Received: from scones-of-silence.splode.com ([216.27.180.143] helo=piglet.prv.splode.com) by monty-python.gnu.org with esmtp (Exim 4.10) id 17daDw-0006Bk-00 for emacs-devel@gnu.org; Sat, 10 Aug 2002 13:40:25 -0400 Original-Received: (from friedman@localhost) by piglet.prv.splode.com (8.9.3/8.9.3) id KAA08971; Sat, 10 Aug 2002 10:40:19 -0700 Original-To: emacs-devel@gnu.org Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6432 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6432 --Mafia/Steve-Case/Crypto-AG/Serbian/illuminati/vCVDrFoV5S Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Speaking of read-file-name calling conventions, I'm running into a case where errors from read-file-name are not caught by condition-case even when they should be. I believe that the code snippet below should print a message in the echo area instead of going into the debugger. This happens building from the cvs trunk as of last night, but I first noticed it a few weeks ago but was too busy to produce a smaller test case. This test case attempts to call read-file-name in an xemacs-compatible fashion but trap errors from that, and is failing. (I first ran into this problem with VM.) To demonstrate the bug, load this file and run M-x foo, then type some partial file name in your current working directory and then try to complete it, e.g. I have a directory called "bin" in my home directory, and if I type M-x b, I get thrown into the elisp debugger. The backtrace is attached below. No fix yet, but I thought I'd report it in the meantime in case someone else immediately recognizes the problem. --Mafia/Steve-Case/Crypto-AG/Serbian/illuminati/vCVDrFoV5S Content-Type: text/plain Content-Disposition: inline; filename="foo.el" Content-Transfer-Encoding: 7bit (setq debug-on-error t) (defun foo () (interactive) (let ((foo-history '("~/foo"))) (condition-case err (read-file-name "Foo: " "~/" nil nil nil foo-history) (error (message "caught error: %s" err))))) --Mafia/Steve-Case/Crypto-AG/Serbian/illuminati/vCVDrFoV5S Content-Type: text/plain Content-Disposition: inline; filename="backtrace.txt" Content-Transfer-Encoding: 7bit Debugger entered--Lisp error: (invalid-function ("~/foo")) ("~/foo")("~/bin/") read-file-name-internal("~/bin/" "~/" lambda) minibuffer-complete() * call-interactively(minibuffer-complete) read-file-name("Foo: " "~/" nil nil nil ("~/foo")) (condition-case err (read-file-name "Foo: " "~/" nil nil nil foo-history) (error (message "caught error: %s" err))) (let ((foo-history ...)) (condition-case err (read-file-name "Foo: " "~/" nil nil nil foo-history) (error ...))) foo() * call-interactively(foo) execute-extended-command(nil) * call-interactively(execute-extended-command) --Mafia/Steve-Case/Crypto-AG/Serbian/illuminati/vCVDrFoV5S--