From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: file-relative-name and remote files Date: Fri, 07 Mar 2003 21:57:23 +0100 Organization: University of Duisburg, Germany Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <84heaex5cc.fsf@lucy.is.informatik.uni-duisburg.de> References: <3E5A8D95.9090803@math.ku.dk> <3E5C8BAC.8000201@math.ku.dk> <3E5E1F42.3020705@math.ku.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1047070702 10202 80.91.224.249 (7 Mar 2003 20:58:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 7 Mar 2003 20:58:22 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Mar 07 21:58:21 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 18rOv7-0002eP-00 for ; Fri, 07 Mar 2003 21:58:21 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18rPG4-0003wS-00 for ; Fri, 07 Mar 2003 22:20:01 +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 18rOvP-0007E5-01 for emacs-devel@quimby.gnus.org; Fri, 07 Mar 2003 15:58:39 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18rOv1-0006qz-00 for emacs-devel@gnu.org; Fri, 07 Mar 2003 15:58:15 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18rOuP-0005ea-00 for emacs-devel@gnu.org; Fri, 07 Mar 2003 15:57:38 -0500 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18rOuM-0005YH-00 for emacs-devel@gnu.org; Fri, 07 Mar 2003 15:57:34 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18rOtn-0002Z4-00 for ; Fri, 07 Mar 2003 21:56:59 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18rOtn-0002Yu-00 for ; Fri, 07 Mar 2003 21:56:59 +0100 Original-Lines: 31 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:/N6sHY8dSKpxJTXQnRv2qukSR9Y= 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:12154 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12154 Richard Stallman writes: > Hmm, this raises the issue of what expand-file-name should do with > "/foo:../..". I guess it must leave that unchanged, which means that > the expand-file-name handler for these file names should be rather > careful in what it does to simplify whatever part of the name comes > after. It is not correct to simplify /X/../Y into /Y when /X > is a remote prefix. Actually, what Tramp does to expand "/foo:../.." is the following: * The localname part ("../..") is not absolute, so it must be relative to the remote home dir. Prepend "~/" to the localname, giving "/foo:~/../..". * Expand tildes, giving, say, "/foo:/home/jrl/../..". * Expand the localname part, giving "/", then tack on the prefix. The final result is "/foo:/". Is this the right behavior so far? In the case of "/root@foo:../..", where the ~root on the remote host is "/root", the result will be "/root@foo:/..", which is not pretty. Maybe this should be expanded, again, to "/". WDYT? -- A preposition is not a good thing to end a sentence with.