From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: URL filename syntax? Date: 14 Apr 2003 17:05:36 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5xk7dxxgov.fsf@kfs2.cua.dk> References: <841y051emv.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1050325704 17736 80.91.224.249 (14 Apr 2003 13:08:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 14 Apr 2003 13:08:24 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Apr 14 15:08:23 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 1953h9-0004bv-00 for ; Mon, 14 Apr 2003 15:08:23 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 1953iW-0003d9-00 for ; Mon, 14 Apr 2003 15:09:49 +0200 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 1953gb-0001pu-06 for emacs-devel@quimby.gnus.org; Mon, 14 Apr 2003 09:07:49 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 1953gB-0001Io-00 for emacs-devel@gnu.org; Mon, 14 Apr 2003 09:07:23 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 1953fu-0000Wk-00 for emacs-devel@gnu.org; Mon, 14 Apr 2003 09:07:10 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 1953fo-00004t-00 for emacs-devel@gnu.org; Mon, 14 Apr 2003 09:07:01 -0400 Original-Received: from kfs2.cua.dk.cua.dk (kfs2.local.filanet.dk [192.168.1.182]) by mail.filanet.dk (Postfix) with SMTP id 6AFC17C012 for ; Mon, 14 Apr 2003 15:06:58 +0200 (CEST) Original-To: emacs-devel@gnu.org In-Reply-To: <841y051emv.fsf@lucy.is.informatik.uni-duisburg.de> Original-Lines: 91 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 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:13224 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13224 kai.grossjohann@gmx.net (Kai Gro=DFjohann) writes: > Is it desirable to use URL-like syntax for remote files? Summary: No. >=20 > Currently, Tramp uses this format: >=20 > /method:user@host:localname >=20 > My idea is to use >=20 > /method://user@host/localname >=20 For normal find-file syntax, // means to discard everything before the second slash; thus, your suggested change may be hard to get through the standard read-file-name function (without some changes at the C level). Also, for a package like ido, the absense of any slashes in the "tramp part" of the file name is a significant advantage when it comes to parsing such strings and determining what is what [and given the obscure ways tramp does method/user/server/file name completion, this is necessary; look at the code in ido.el, if you don't believe me :-)] > I think we can't require our users to type %2F in such cases, and > therefore I propose to change the ftp URL syntax to interpret > ftp://user@host//foo as the file /foo on the remote host. (And > ftp://user@host/foo refers to ~user/foo.) Again, you are violating the principle that // has a special meaning when entering a file name. >=20 > * Tramp allows to omit the method. How do I do that with URLs? ///user@host/localname [things get worse, right?] >=20 > * Tramp also supports multi-hop connections, with a syntax like >=20 > /multi:hop1:hop2:...:hopN:localname >=20 > where hopI looks like hop-method:user@host. So, for example, >=20 > /multi:telnet:kai@marvin:su:root@localhost:/etc/passwd >=20 > means to use telnet to log in as user kai on marvin, then use > /bin/su there to become root, then access the file /etc/passwd. With URL syntax, you would need to write // to access a file from the root, ie. /multi://telnet:kai@marvin/su:root@localhost//etc/passwd =20 or you would open ~root/etc/passwd, right? >=20 > In the rare case where one would like to access a file/directory > whose name contains a colon, one can add slashes. So to access the > file "foo:bar" in root's homedir, one could use >=20 > /multi:telnet:kai@marvin:su:root@localhost:~/foo:bar >=20 > which is unambiguous. Ok, but I suppose that is a general problem, not specific to using the URL syntax or not. >=20 > Clearly, multi://telnet:kai@marvin/su:root@localhost/foo:bar will > not work so well...=20=20 Agree!=20 > Hm. But I could support ~, too, so this would > become multi://telnet:kai@marvin/su:root@localhost/~/foo:bar which > is unambiguous. And ugly. I definitely prefer the current tramp syntax! It does the job well, has a tidy syntax, works well with read-file-name (and ido), and it doesn't pretend to be something it ain't. --=20 Kim F. Storm http://www.cua.dk