[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: URL filename syntax?
From: |
Stefan Monnier |
Subject: |
Re: URL filename syntax? |
Date: |
Mon, 14 Apr 2003 10:29:07 -0400 |
> > 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://address@hidden//foo as the file /foo on the remote host. (And
> > ftp://address@hidden/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 /address@hidden:/ that turns
the name into a URL, so people can use the old syntax and
it's automatically changed for them.
> /multi://telnet:address@hidden/su:address@hidden//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