From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: Possible bug in resolving "~" folder Date: Mon, 26 May 2003 10:31:20 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200305261431.h4QEVKrt000444@rum.cs.yale.edu> References: <20030526051906.F3F785F1F1@smtp.us2.messagingengine.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1053959535 28156 80.91.224.249 (26 May 2003 14:32:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 26 May 2003 14:32:15 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon May 26 16:32:13 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19KJ1J-0007Jz-00 for ; Mon, 26 May 2003 16:32:13 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19KJEY-0004FO-00 for ; Mon, 26 May 2003 16:45:54 +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 19KJ1l-0007LJ-M2 for emacs-devel@quimby.gnus.org; Mon, 26 May 2003 10:32:41 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19KJ13-0006lJ-BV for emacs-devel@gnu.org; Mon, 26 May 2003 10:31:57 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19KJ0q-0006Es-Rl for emacs-devel@gnu.org; Mon, 26 May 2003 10:31:45 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19KJ0S-0005cB-RV; Mon, 26 May 2003 10:31:20 -0400 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h4QEVKx6000446; Mon, 26 May 2003 10:31:20 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h4QEVKrt000444; Mon, 26 May 2003 10:31:20 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: "Dhruva Krishnamurthy" Original-cc: Emacs Bug X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:14287 gmane.emacs.pretest.bugs:498 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:14287 > 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))))) It's been fixed a while ago in vc-mcvs.el, but it seems nobody has refreshed the loaddefs.el file since. The fix doesn't do the expand-file-name but checks nil instead because I thought it was neat that the search stops at ~ rather than going all the way to /. Could someone commit a refreshed version of loaddefs.el ? Mine has all kinds of unrelated stuff in it. Stefan