all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* URL filename syntax?
@ 2003-04-14 11:51 Kai Großjohann
  2003-04-14 15:05 ` Kim F. Storm
  2003-04-15 16:26 ` Ehud Karni
  0 siblings, 2 replies; 9+ messages in thread
From: Kai Großjohann @ 2003-04-14 11:51 UTC (permalink / raw)


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)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-04-18  2:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-14 11:51 URL filename syntax? Kai Großjohann
2003-04-14 15:05 ` Kim F. Storm
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

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.