unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Daniel Colascione <dancol@dancol.org>
Cc: Achim Gratz <Stromeko@nexgo.de>, emacs-devel@gnu.org
Subject: Re: file://host/location URLs
Date: Mon, 19 Nov 2012 12:54:00 +0900	[thread overview]
Message-ID: <87haom6yef.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <50A8FF48.6090007@dancol.org>

Daniel Colascione writes:

 > Yes, my proposal violates the RFC. I maintain that nobody deliberately
 > constructs file URLs

Shouldn't you put a period here? ;-)  Seriously, I expect that people
who deliberately write file URIs probably know what an RFC is, and may
even have read the relevant ones.  It's not like an http URI where
any Facebook user has at least seen them.

On the contrary, I had an experimental implementation of an URL
handler that used TRAMP to deal with file URLs, and tested it with
deliberately constructed file URLs.  So "nobody" is wrong.  I've seen
such URLs in the wild, used properly though not in a programmatic
context (in a trust group with access to several hosts, indicating use
with SSH or scp, written on paper napkins and the like).

 > pointing to remote hosts,

I disagree.  To me, it's the obvious RFC-standardized way to write an
ssh/scp/sftp URL[1] for fetching a file from a specific host, where
the user of the URL is expected to be able to access the same file
system on that host as the writer, but without constraining the user
to a possibly inconvenient transport protocol.

If you're saying that users sometimes write file://usr/bin/emacs when
they mean either file:///usr/bin/emacs, file:/usr/bin/emacs, or maybe
file:usr/bin/emacs, too bad for those users.  Even on Windows, with a
leading doubled slash the following element indicates the host
providing a service (ie, a namespace authority in URI-speak).

As for the bug in Emacs (and other programs), what else is new?  Emacs
is buggy.  Fix the bug.

 > and that the behavior that best matches user intent is to always
 > interpret file URIs as local, RFC be damned.

And what are you proposing?  Should file://bogus/foo be interpreted as
file:///bogus/foo or as file:bogus/foo?  Or perhaps as file:///foo?

If you want to know what users think, make file://bogus/foo...  error
at parse time if bogus doesn't resolve to the local host.  They'll
tell you.  But it's a bad idea to guess, and a worse idea to take a
precise syntax and make it fuzzy.  Next users will request that such
fuzziness should be allowed for http and other URLs.  After all, it's
obvious what they meant when they wrote http:/www.gnu.org/, right?

By the way, none of the above means that you shouldn't write a
defuzzer program to guess what possibly broken URIs were intended to
be.  Users who can't or won't learn how to write conforming URIs can
install it themselves, and I see nothing wrong with that.

But Emacs itself should follow the RFC here.  The RFC is not broken.


Footnotes: 
[1]  Yes, I'm aware of the *long*-expired IETF draft, though not why
it expired without being approved for RFC status.  Possibly because of
the overlap with the existing file URI?




  reply	other threads:[~2012-11-19  3:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-15 23:43 file://host/location URLs Daniel Colascione
2012-11-16 14:18 ` Stefan Monnier
2012-11-17  0:58 ` James Cloos
2012-11-17  3:00   ` Daniel Colascione
2012-11-17  8:25     ` Achim Gratz
2012-11-17 20:16       ` James Cloos
2012-11-18  8:12         ` Chong Yidong
2012-11-18 15:31       ` Daniel Colascione
2012-11-19  3:54         ` Stephen J. Turnbull [this message]
2012-11-19 17:16           ` Achim Gratz
2012-11-20 12:54         ` Jason Rumney
2012-11-20 20:07           ` Daniel Colascione
2012-11-20 20:52             ` Achim Gratz
2012-11-21  6:33         ` joakim
2012-11-21  8:29           ` Andreas Schwab
2012-11-22  8:50             ` joakim
2012-11-18 15:27   ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87haom6yef.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=Stromeko@nexgo.de \
    --cc=dancol@dancol.org \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).