From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Lars Hansen Newsgroups: gmane.emacs.devel Subject: Re: file-relative-name and remote files Date: Wed, 26 Feb 2003 10:41:00 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <3E5C8BAC.8000201@math.ku.dk> References: <3E5A8D95.9090803@math.ku.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1046252533 15431 80.91.224.249 (26 Feb 2003 09:42:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 26 Feb 2003 09:42:13 +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 18ny4q-00040k-00 for ; Wed, 26 Feb 2003 10:42:12 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18nyLC-0005I6-00 for ; Wed, 26 Feb 2003 10:59:07 +0100 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 18ny3y-0004Tx-0B for emacs-devel@quimby.gnus.org; Wed, 26 Feb 2003 04:41:18 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18ny3l-0004Hj-00 for emacs-devel@gnu.org; Wed, 26 Feb 2003 04:41:05 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18ny3X-0003wH-00 for emacs-devel@gnu.org; Wed, 26 Feb 2003 04:40:52 -0500 Original-Received: from [62.84.220.10] (helo=mail.dantel.dk) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18ny3M-0003S0-00 for emacs-devel@gnu.org; Wed, 26 Feb 2003 04:40:40 -0500 Original-Received: from math.ku.dk [62.84.221.46] by mail.dantel.dk with ESMTP (SMTPD32-7.13) id ACAA3DD00BA; Wed, 26 Feb 2003 10:45:14 +0100 User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en Original-To: emacs-devel@gnu.org In-Reply-To: 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:11969 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11969 > > >What do you mean by "reside in different trees"? > > I use to think of files as making up a tree structure. Actually it is a graph rather than tree, because of the possibility of links. What I mean by "different trees" is what more accurately should be called non-conneted graphs. As Stefan Monnier pointed out to me, I misunderstood your last mail. I understand now that the files on eg. galois.math.ku.dk should be thought of as part of the usual (local) tree in the directory "/ssh:larsh@galois.math.ku.dk/". There is, however, a problem. Although "/ssh:larsh@galois.math.ku.dk:/../emacs/" and "/emacs/../ssh:larsh@galois.math.ku.dk:/" makes good sense in this model, it does not work in Emacs: (file-attributes "/larsh@galois.math.ku.dk:/") => (t 21 0 0 (15679 61995) (15917 64402) (15917 64402) 624 "drwxr-xr-x" t (0 . 2) (-1 0)) (file-attributes "/emacs/") => (t 1 123 123 (15592 11887) (15593 21299) (15593 21299) 0 "drwxrwxrwx" nil 0 (7228 . 7896)) (file-attributes "/larsh@galois.math.ku.dk:/../emacs") => nil (file-attributes "/emacs/../larsh@galois.math.ku.dk:/") => nil It would be nice to make it work, but I guess it is not a small task. IMHO we should add an optional parameter to file-relative-name specifying whether files on different machines should be mapped into one tree or not. If the option is set, I think DOS/windows drives should be mapped into one tree as well. Eg. (file-relative-name "c:/file" "d:/dir/) should return "../../c:/file".