From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.devel Subject: Re: paths are sensative to double separators Date: Fri, 20 Mar 2009 23:24:31 +0200 Message-ID: <871vsr3n1s.fsf@kobe.laptop> References: <20090319015037.GC6695@reforged> <87skl97og1.fsf@kobe.laptop> <87prgdsigb.fsf@xemacs.org> <87tz5p5xyo.fsf@kobe.laptop> <87ocvwsq0z.fsf@xemacs.org> <87iqm4s0p3.fsf@xemacs.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1237584307 5151 80.91.229.12 (20 Mar 2009 21:25:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Mar 2009 21:25:07 +0000 (UTC) Cc: xah@xahlee.org, Mike Mattie , "Stephen J. Turnbull" , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 20 22:26:23 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LkmEM-0003EV-AF for ged-emacs-devel@m.gmane.org; Fri, 20 Mar 2009 22:26:18 +0100 Original-Received: from localhost ([127.0.0.1]:37479 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkmCz-0007HR-J1 for ged-emacs-devel@m.gmane.org; Fri, 20 Mar 2009 17:24:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LkmCs-0007Gr-Bq for emacs-devel@gnu.org; Fri, 20 Mar 2009 17:24:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LkmCn-0007G6-Gh for emacs-devel@gnu.org; Fri, 20 Mar 2009 17:24:45 -0400 Original-Received: from [199.232.76.173] (port=56903 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkmCn-0007G2-CW for emacs-devel@gnu.org; Fri, 20 Mar 2009 17:24:41 -0400 Original-Received: from poseidon.ceid.upatras.gr ([150.140.141.169]:36772) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LkmCm-0005Eq-Oj for emacs-devel@gnu.org; Fri, 20 Mar 2009 17:24:41 -0400 Original-Received: from mail.ceid.upatras.gr (unknown [10.1.0.143]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id BFAB7EB4C0B; Fri, 20 Mar 2009 23:24:37 +0200 (EET) Original-Received: from localhost (europa.ceid.upatras.gr [127.0.0.1]) by mail.ceid.upatras.gr (Postfix) with ESMTP id ACC604509B; Fri, 20 Mar 2009 23:24:37 +0200 (EET) X-Virus-Scanned: amavisd-new at ceid.upatras.gr Original-Received: from mail.ceid.upatras.gr ([127.0.0.1]) by localhost (europa.ceid.upatras.gr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9VvryT+C7Frr; Fri, 20 Mar 2009 23:24:37 +0200 (EET) Original-Received: from kobe.laptop (adsl38-146.kln.forthnet.gr [77.49.165.146]) by mail.ceid.upatras.gr (Postfix) with ESMTP id 785F04503F; Fri, 20 Mar 2009 23:24:37 +0200 (EET) Original-Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n2KLOa94050393; Fri, 20 Mar 2009 23:24:36 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Original-Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n2KLOVQM050392; Fri, 20 Mar 2009 23:24:31 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) In-Reply-To: (Stefan Monnier's message of "Fri, 20 Mar 2009 16:19:18 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (berkeley-unix) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109738 Archived-At: On Fri, 20 Mar 2009 16:19:18 -0400, Stefan Monnier 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 :-)