From: storm@cua.dk (Kim F. Storm)
Subject: Re: URL filename syntax?
Date: 14 Apr 2003 17:05:36 +0200 [thread overview]
Message-ID: <5xk7dxxgov.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <841y051emv.fsf@lucy.is.informatik.uni-duisburg.de>
kai.grossjohann@gmx.net (Kai Großjohann) writes:
> Is it desirable to use URL-like syntax for remote files?
Summary: No.
>
> Currently, Tramp uses this format:
>
> /method:user@host:localname
>
> My idea is to use
>
> /method://user@host/localname
>
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.
>
> * Tramp allows to omit the method. How do I do that with URLs?
///user@host/localname
[things get worse, right?]
>
> * 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.
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
or you would open ~root/etc/passwd, right?
>
> 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.
Ok, but I suppose that is a general problem, not specific to using the
URL syntax or not.
>
> Clearly, multi://telnet:kai@marvin/su:root@localhost/foo:bar will
> not work so well...
Agree!
> 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.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2003-04-14 15:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-14 11:51 URL filename syntax? Kai Großjohann
2003-04-14 15:05 ` Kim F. Storm [this message]
2003-04-14 14:29 ` Stefan Monnier
2003-04-14 19:50 ` Oliver Scholz
2003-04-15 16:26 ` Ehud Karni
2003-04-15 19:19 ` Kai Großjohann
2003-04-15 21:20 ` Ehud Karni
2003-04-17 14:55 ` Kai Großjohann
2003-04-18 2:51 ` Stephen J. Turnbull
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5xk7dxxgov.fsf@kfs2.cua.dk \
--to=storm@cua.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.