all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Giorgos Keramidas <keramida@ceid.upatras.gr>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: xah@xahlee.org, Mike Mattie <codermattie@gmail.com>,
	"Stephen J. Turnbull" <stephen@xemacs.org>,
	emacs-devel@gnu.org
Subject: Re: paths are sensative to double separators
Date: Fri, 20 Mar 2009 23:24:31 +0200	[thread overview]
Message-ID: <871vsr3n1s.fsf@kobe.laptop> (raw)
In-Reply-To: <jwvskl87y00.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 20 Mar 2009 16:19:18 -0400")

On Fri, 20 Mar 2009 16:19:18 -0400, Stefan Monnier <monnier@IRO.UMontreal.CA> wrote:
>> The question I asked is, will "hg://authority//foo" be converted to
>> "hg://authority/foo"?
>
> Assuming that the URL library is extended to understand the `hg'
> protocol, and that url-handler-mode is modified to provide access to it:
> no, such a conversion will not take place.
>
>> Url-handler-mode is clearly broken in 22.1.1.
>
> It's not very reliable in Emacs-23 either, to tell you the truth, which
> is why it's not enabled by default.
>
>> It doesn't understand the hg: scheme, so after enabling url handler
>> mode, C-x C-f C-a C-k "hg://" ==> "/" in the minibuffer, and even
>
> Indeed, there is no support for the `hg' protocol in the URL library.

The double slash in Mercurial repositories is actually a semi-standard
way of referring to pathnames rooted at the `filesystem root' instead of
the default starting directory for the particular URI authority.

RFC 2396 section 5.2 defines an _example_ scheme of resolving relative
URI based on an application-specific base URI.  Part of that example
scheme states:

   5) If the path component begins with a slash character ("/"), then
      the reference is an absolute-path and we skip to step 7.

Based on an interpretation of this RFC example, Mercurial (and possibly
other systems too) interpret URIs using a scheme that maps:

    ssh://user@host/foo         The file `foo' under the HOME directory
                                of `user'.

    ssh://user@host//foo        The file `foo' at the file system root.

This interpretation of URIs is not specific to `hg://' URIs, so if we do
something that parses this sort of double-slash path in the URL library,
it may be nice if we enable it at least for the first path delimiting
slash after the URI authority for most schemes.  Or at least if we can
make it configurable which schemes support this sort of thing.  A list
of URI schemes that support this sort of path-parsing would be really
nice to have as a customizable option :-)





  reply	other threads:[~2009-03-20 21:24 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-19  1:50 paths are sensative to double separators Mike Mattie
2009-03-19  2:50 ` xah lee
2009-03-19  5:42   ` Harald Hanche-Olsen
2009-03-19  6:54     ` Miles Bader
2009-03-19 16:33     ` David De La Harpe Golden
2009-03-19 19:37     ` Richard M Stallman
2009-03-20  0:38     ` xah lee
2009-03-19  9:48   ` Sebastian Rose
2009-03-19 11:16   ` Giorgos Keramidas
2009-03-19 14:20     ` Stephen J. Turnbull
2009-03-19 15:33       ` Giorgos Keramidas
2009-03-20  5:48         ` Stephen J. Turnbull
2009-03-20 12:57           ` Stefan Monnier
2009-03-20 14:55             ` Stephen J. Turnbull
2009-03-20 20:19               ` Stefan Monnier
2009-03-20 21:24                 ` Giorgos Keramidas [this message]
2009-03-20 22:56                   ` Sebastian Rose
2009-03-21  0:12                     ` Miles Bader
2009-03-21  4:43                   ` Stephen J. Turnbull
2009-03-21 16:04                     ` Giorgos Keramidas
2009-03-20 15:01             ` Eli Zaretskii
2009-03-20 20:14               ` Stefan Monnier
2009-03-19 15:47     ` Stefan Monnier
2009-03-19 19:08       ` Giorgos Keramidas
2009-03-19 23:59     ` Byung-Hee HWANG
2009-03-19  3:09 ` Miles Bader
2009-03-19 10:26   ` Sebastian Rose
2009-03-19 15:46     ` Miles Bader
2009-03-19 20:32     ` Stefan Monnier
2009-03-19 21:18       ` Sebastian Rose
2009-03-19 13:33   ` Stefan Monnier
2009-03-19 17:50     ` Mike Mattie
2009-03-19 20:34       ` Stefan Monnier
2009-03-19 21:32         ` Mike Mattie
  -- strict thread matches above, loose matches on Subject: below --
2009-03-19 21:25 Xavier Maillard

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=871vsr3n1s.fsf@kobe.laptop \
    --to=keramida@ceid.upatras.gr \
    --cc=codermattie@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=stephen@xemacs.org \
    --cc=xah@xahlee.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 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.