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: Emacs-devel Digest, Vol 4, Issue 19 Date: Sat, 08 Mar 2003 09:32:14 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <3E69AA8E.6020404@math.ku.dk> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1047112367 5213 80.91.224.249 (8 Mar 2003 08:32:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 8 Mar 2003 08:32:47 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Mar 08 09:32:46 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 18rZl8-0001Lx-00 for ; Sat, 08 Mar 2003 09:32:46 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18ra6K-0001tv-00 for ; Sat, 08 Mar 2003 09:54:41 +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 18rZkj-0003I0-01 for emacs-devel@quimby.gnus.org; Sat, 08 Mar 2003 03:32:21 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18rZkY-0003E7-00 for emacs-devel@gnu.org; Sat, 08 Mar 2003 03:32:10 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18rZkS-00031z-00 for emacs-devel@gnu.org; Sat, 08 Mar 2003 03:32:05 -0500 Original-Received: from [62.84.220.10] (helo=post.kabelnettet.dk) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18rZk6-0002Md-00 for emacs-devel@gnu.org; Sat, 08 Mar 2003 03:31:42 -0500 Original-Received: from math.ku.dk [62.84.221.46] by post.kabelnettet.dk with ESMTP (SMTPD32-7.14) id AB6E3D50282; Sat, 08 Mar 2003 09:35:58 +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:12166 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12166 > > >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? > > One might look at file name in the following two ways: 1. An optional remote prefix followed by something. 2. A sequence of strings separated by slashes. Which view should be given highest precedence? If the first view is given the highest precedence, I think the "/.." part of "/root@foo:/.." should be interpreted as it would on the remote machine, i.e. "/root@foo:/.." should normally expand to "/root@foo:/". In this case a file cannot be named relative to a directory if the file and the directory are on different machines. If the second view is given the highest precedence, "/x/.." should expand to "/" independently of what "x" is. Thus "/root@foo:/.." as well as "/foo:../.." should expand to "/". In this case a file can always be named relative to a directory. In this case expand-file-name should be changed to remove ".."'s *before* file handlers are called. IMHO the two choises of precedence should not be mixed.