From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: On DOS/Windows, unnecessary load of tramp by `file-relative-name' Date: Tue, 29 Apr 2003 17:38:44 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200304292138.h3TLcjcK007617@rum.cs.yale.edu> References: <21141901.1051181645426.JavaMail.www@wwinf0602> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1051652418 15242 80.91.224.249 (29 Apr 2003 21:40:18 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 29 Apr 2003 21:40:18 +0000 (UTC) Cc: emacs-devel Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 29 23:40:12 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 19Acpf-0003xe-00 for ; Tue, 29 Apr 2003 23:40:11 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19AcyV-0006C9-00 for ; Tue, 29 Apr 2003 23:49:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19Acob-0007ip-02 for emacs-devel@quimby.gnus.org; Tue, 29 Apr 2003 17:39:05 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19AcoJ-0007ih-00 for emacs-devel@gnu.org; Tue, 29 Apr 2003 17:38:47 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19AcoI-0007iW-00 for emacs-devel@gnu.org; Tue, 29 Apr 2003 17:38:46 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19AcoH-0007iS-00 for emacs-devel@gnu.org; Tue, 29 Apr 2003 17:38:45 -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 h3TLcjx6007619; Tue, 29 Apr 2003 17:38:45 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h3TLcjcK007617; Tue, 29 Apr 2003 17:38:45 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: David PONCE 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:13561 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13561 > After some investigation, I found that `file-relative-name' put a > leading slash on file and directory names before comparing them to > find the relative name. On DOS/Windows, when the name begins with a > drive letter, for example "c:/emacs", `file-relative-name' actually > use this form internally: "/c:/emacs". Unfortunately that form > matches `tramp-file-name-regexp', which causes "tramp.el" to be loaded > when `file-relative-name' then calls `file-name-as-directory'. [...] > ! (unless (eq (aref filename 0) ?/) > (setq filename (concat "/" filename))) > ! (unless (eq (aref directory 0) ?/) > (setq directory (concat "/" directory))) Actually even after the change to file-name-absolute-p, the above code looks bogus since both `filename' and `directory' have passed through expand-file-name and should thus be absolute already. I suspect the four lines should purely and simply be removed. Stefan