From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Dhruva Krishnamurthy" Newsgroups: gmane.emacs.pretest.bugs,gmane.emacs.devel Subject: Possible bug in resolving "~" folder Date: Mon, 26 May 2003 10:49:06 +0530 Sender: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Message-ID: <20030526051906.F3F785F1F1@smtp.us2.messagingengine.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1053926277 30316 80.91.224.249 (26 May 2003 05:17:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 26 May 2003 05:17:57 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Mon May 26 07:17:56 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19KAMt-0007sm-00 for ; Mon, 26 May 2003 07:17:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19KAOc-0000JO-Ks for gebp-emacs-pretest-bug@gmane.org; Mon, 26 May 2003 01:19:42 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19KAOX-000063-5a for emacs-pretest-bug@gnu.org; Mon, 26 May 2003 01:19:37 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19KAON-000823-LX for emacs-pretest-bug@gnu.org; Mon, 26 May 2003 01:19:28 -0400 Original-Received: from ny2.fastmail.fm ([66.111.4.3] helo=smtp.us2.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.20) id 19KAO3-0007Wt-Oa; Mon, 26 May 2003 01:19:07 -0400 Original-Received: from smtp.us2.messagingengine.com (server2.internal [10.202.2.133]) by server2.messagingengine.com (Postfix) with ESMTP id 063DE5E0AF; Mon, 26 May 2003 01:19:07 -0400 (EDT) Original-Received: from 127.0.0.1 ([127.0.0.1] helo=smtp.us2.messagingengine.com) by messagingengine.com with SMTP; Mon, 26 May 2003 01:19:07 -0400 Original-Received: by smtp.us2.messagingengine.com (Postfix, from userid 99) id F3F785F1F1; Mon, 26 May 2003 01:19:06 -0400 (EDT) Content-Disposition: inline X-Mailer: MIME::Lite 1.2 (F2.71; T1.001; A1.51; B2.12; Q2.03) Original-To: "Emacs Bug" X-Epoch: 1053926347 X-Sasl-enc: rN4WJLgfvIWqK5PAiD3hRg X-BeenThere: emacs-pretest-bug@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.pretest.bugs:495 gmane.emacs.devel:14271 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:14271 Hello, I am using Emacs 21.3.50 (CVS) on W2K (MSVC 6.0 build). Scenerio: - Open a file (as in my case:"~/bin/cinclude.pl") - Do a Save As (to "~/bin/cinclude1_0.pl") - A call to (vc-mcvs-registered "~/bin/cinclude1_0.pl") is made - In the "while" loop, a call to (file-name-directory "~") [progressively going to top dir] - The above call returns "nil". IMHO, it should have called "expand-file-name" internally inside "file-name-directory" or should handle 'nil' and return 'nil' instead of throwing error. A fix which solved my problem was: in loaddefs.el @23991, call expand-file-name (defun vc-mcvs-registered (file) (let ((dir file)) (while (and (stringp dir) (not (equal dir (setq dir (file-name-directory (expand-file-name dir)))))) ;; Modified here (setq dir (if (file-directory-p (expand-file-name "MCVS/CVS" dir)) t (directory-file-name dir)))) (if (eq dir t) (progn (load "vc-mcvs") (vc-mcvs-registered file))))) -- Dhruva Krishnamurthy Home: http://www32.brinkster.com/schemer/