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: Tue, 11 Mar 2003 11:05:19 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <3E6DB4DF.1070307@math.ku.dk> References: 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 1047377794 7363 80.91.224.249 (11 Mar 2003 10:16:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 11 Mar 2003 10:16:34 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Mar 11 11:16:32 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 18sgoC-0001ub-00 for ; Tue, 11 Mar 2003 11:16:32 +0100 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18shAt-0006Ay-00 for ; Tue, 11 Mar 2003 11:39:59 +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 18sgmE-0007lR-01 for emacs-devel@quimby.gnus.org; Tue, 11 Mar 2003 05:14:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18sgjq-0006lA-00 for emacs-devel@gnu.org; Tue, 11 Mar 2003 05:12:02 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18sgiZ-0005x5-00 for emacs-devel@gnu.org; Tue, 11 Mar 2003 05:10:44 -0500 Original-Received: from imf.math.ku.dk ([130.225.103.32]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18sgdQ-0002Vw-00 for emacs-devel@gnu.org; Tue, 11 Mar 2003 05:05:24 -0500 Original-Received: by imf.math.ku.dk (Postfix on SuSE Linux 7.3 (i386), from userid 73) id C9C6F75DC0; Tue, 11 Mar 2003 11:05:20 +0100 (MET) Original-Received: from imf (localhost [127.0.0.1])07DCC75DE0 for ; Tue, 11 Mar 2003 11:05:20 +0100 (MET) Original-Received: from math.ku.dk (shannon.math.ku.dk [130.225.103.12]) 501D273342 for ; Tue, 11 Mar 2003 11:05:19 +0100 (MET) User-Agent: Mozilla/5.0 (X11; U; Linux i686; 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:12268 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12268 > > >But Richard wants to allow ".." to cross file handler boundaries. >So "/foo:/../bar" should expand to "/bar", just like "/foo/../bar" >does. > >I think that means we're back to square one and we need to find out >how to deal with things like "/bla/../foo:/bar". Hm. Actually, that >expands to "/foo:/bar" which is fine. But "/bla/../foo:../bar" >expands to "/foo:../bar" which is not fine -- it should be expanded >further. > >One approach that might work is this: if expand-file-name does not >find a handler, it does its thing and then looks again if it finds a >handler. Then it invokes that. > >(Maybe it is easier to implement the previous paragraph by saying, >after expand-file-name has done its thing in the non-handler case, it >just reinvokes itself.) > > Ok, I think I begin to get the right view of things. If it is still not right, please correct me. We want to use the file name handler mecanism to make the directory tree of a remote machine appear as if it was on the local machine in directory "/foo:". This works by now except that "/bla/../foo:" is not handeled correctly, because the file handler is not invoced. Maybe the "/bla/../foo:" problem could be solved the following way: Change the file handler syntax from "^/[^/:]+:" to "/[^/:]+:" to invoke Tramp. Let Tramp call expand-file-name on "/bla/..". If this expands to "/" everything is fine, otherwise barf.