From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: URL filename syntax? Date: Mon, 14 Apr 2003 13:51:04 +0200 Organization: University of Duisburg, Germany Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <841y051emv.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1050321485 30319 80.91.224.249 (14 Apr 2003 11:58:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 14 Apr 2003 11:58:05 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Apr 14 13:58:04 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 1952b6-0007si-00 for ; Mon, 14 Apr 2003 13:58:04 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 1952cS-0002xL-00 for ; Mon, 14 Apr 2003 13:59:28 +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 1952XA-00071L-0A for emacs-devel@quimby.gnus.org; Mon, 14 Apr 2003 07:54:00 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 1952Wi-0006PI-00 for emacs-devel@gnu.org; Mon, 14 Apr 2003 07:53:32 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 1952Wg-0006Kx-00 for emacs-devel@gnu.org; Mon, 14 Apr 2003 07:53:30 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 1952WS-0005ZR-00 for emacs-devel@gnu.org; Mon, 14 Apr 2003 07:53:16 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1952Vo-0007Vt-00 for ; Mon, 14 Apr 2003 13:52:36 +0200 Mail-Followup-To: emacs-devel@gnu.org 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 1952Vm-0007VR-00 for ; Mon, 14 Apr 2003 13:52:34 +0200 Original-Lines: 63 Original-X-Complaints-To: usenet@main.gmane.org Mail-Copies-To: never User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:d0FSPQInKRd4MXNvj9WCowZ4nlc= 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:13222 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13222 Is it desirable to use URL-like syntax for remote files? Currently, Tramp uses this format: /method:user@host:localname My idea is to use /method://user@host/localname where the initial slash is optional. The initial slash is needed to provide the old magic slash behavior. There are some issues with this: * The URL syntax should be as close to the standard as possible. But the ftp URL RFC states that an ftp URL looks like this: ftp://user@host/component1/component2/.../componentN where each component can be a string or empty. The semantics are that the user agend does "CWD component1" followed by "CWD component2" and so on. This means that ftp://user@host/etc/motd refers to the file ~user/etc/motd on the remote host, as do ftp://user@host//etc/motd and ftp://user@host/a/b/c//etc/motd. In order to reference /etc/motd on the remote host, one has to use ftp://user@host/%2Fetc/motd. 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.) * Tramp allows to omit the method. How do I do that with URLs? * Tramp also supports multi-hop connections, with a syntax like /multi:hop1:hop2:...:hopN:localname where hopI looks like hop-method:user@host. So, for example, /multi:telnet:kai@marvin:su:root@localhost:/etc/passwd 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. 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 /multi:telnet:kai@marvin:su:root@localhost:~/foo:bar which is unambiguous. Clearly, multi://telnet:kai@marvin/su:root@localhost/foo:bar will not work so well... Hm. But I could support ~, too, so this would become multi://telnet:kai@marvin/su:root@localhost/~/foo:bar which is unambiguous. -- file-error; Data: (Opening input file no such file or directory ~/.signature)