From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: file-relative-name and remote files Date: Tue, 25 Feb 2003 11:57:44 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <3E5A8D95.9090803@math.ku.dk> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1046192857 18263 80.91.224.249 (25 Feb 2003 17:07:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 25 Feb 2003 17:07:37 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18niYJ-0004kP-00 for ; Tue, 25 Feb 2003 18:07:35 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18nioL-00046O-00 for ; Tue, 25 Feb 2003 18:24:09 +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 18niQF-0004G7-01 for emacs-devel@quimby.gnus.org; Tue, 25 Feb 2003 11:59:15 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18niPP-00042p-00 for emacs-devel@gnu.org; Tue, 25 Feb 2003 11:58:23 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18niOv-0003Ei-00 for emacs-devel@gnu.org; Tue, 25 Feb 2003 11:57:56 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18niOn-0002yh-00 for emacs-devel@gnu.org; Tue, 25 Feb 2003 11:57:45 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 18niOm-0000ga-00; Tue, 25 Feb 2003 11:57:44 -0500 Original-To: Lars Hansen In-reply-to: <3E5A8D95.9090803@math.ku.dk> (message from Lars Hansen on Mon, 24 Feb 2003 22:24:37 +0100) 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:11937 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11937 Any file can be written as a name relative to any directory using the ".." construct, as long as both are residing in the same directory tree. The problem is when they reside in different trees. What do you mean by "reside in different trees"? But file-relative-name needs to know when this is so. Try (file-relative-name "/dir/file" "/scp:larsh@galois.math.ku.dk:/dir1/") It returns "../../dir/file" which seems correct to me. ought to return "/dir/file" since filename is on the local machine and directory on the remote, It might be useful or convenient to return that instead; I am not sure. However, the current value isn't erroneous.