From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: URL filename syntax? Date: Mon, 14 Apr 2003 10:29:07 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200304141429.h3EET7t6025961@rum.cs.yale.edu> References: <841y051emv.fsf@lucy.is.informatik.uni-duisburg.de> <5xk7dxxgov.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1050330665 10183 80.91.224.249 (14 Apr 2003 14:31:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 14 Apr 2003 14:31:05 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Apr 14 16:31:03 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 1954yU-0002ad-00 for ; Mon, 14 Apr 2003 16:30:22 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 1954zq-0004UN-00 for ; Mon, 14 Apr 2003 16:31:50 +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 1954xh-0000Bn-08 for emacs-devel@quimby.gnus.org; Mon, 14 Apr 2003 10:29:33 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 1954xM-0008Mx-00 for emacs-devel@gnu.org; Mon, 14 Apr 2003 10:29:12 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 1954xK-0008If-00 for emacs-devel@gnu.org; Mon, 14 Apr 2003 10:29:11 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 1954xJ-0008Go-00 for emacs-devel@gnu.org; Mon, 14 Apr 2003 10:29:09 -0400 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h3EET7x6025963; Mon, 14 Apr 2003 10:29:07 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h3EET7t6025961; Mon, 14 Apr 2003 10:29:07 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: storm@cua.dk (Kim F. Storm) 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:13226 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13226 > > Is it desirable to use URL-like syntax for remote files? > Summary: No. I think in the abstract: yes. But since url-handler.el already tries to do it, you have to be careful not to step on each other's toes. > 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). I think it works OK in practice. You need to provide an appropriate file-handler for substitute-in-file-name, which is inconvenient (since you need to re-implement the env-var expansion code), but it's nothing too bad. > > 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. But it's only relevant for file-name entry, so the only question is whether it's going to surprise people and I'd say that as a user I'd be rather happy to be able to enter a URL even if that means that I might sometimes need to C-a C-k rather than just appending the absolute name of the file I'm looking for. > > * Tramp allows to omit the method. How do I do that with URLs? You don't. Or you provide a handler for /user@host:/ that turns the name into a URL, so people can use the old syntax and it's automatically changed for them. > /multi://telnet:kai@marvin/su:root@localhost//etc/passwd > or you would open ~root/etc/passwd, right? The home dir of the user "root" doesn't have to be "/". > 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. I can probably agree with the fact that Tramp's syntax is OK and does the job well. For ange-ftp it's different: the URL syntax is well established for FTP whereas it's not for ssh and friends. I like to be able to copy/paste URLs from email and whatnot and open them in Emacs without having to adjust the name. url-handler.el serves me "well" except for the fact that it's not too robust. Stefan