From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#6339: url-filename => "/c:/some/file.txt" Date: Sun, 25 Sep 2011 02:02:03 +0200 Message-ID: References: <87bouahatm.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1316909017 16628 80.91.229.12 (25 Sep 2011 00:03:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 25 Sep 2011 00:03:37 +0000 (UTC) Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 25 02:03:32 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R7cBw-0000WE-8i for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Sep 2011 02:03:32 +0200 Original-Received: from localhost ([::1]:50242 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7cBv-0000Hl-Fv for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 Sep 2011 20:03:31 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7cBt-0000Hg-3q for bug-gnu-emacs@gnu.org; Sat, 24 Sep 2011 20:03:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R7cBs-0004X7-1z for bug-gnu-emacs@gnu.org; Sat, 24 Sep 2011 20:03:29 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7cBr-0004X3-VK for bug-gnu-emacs@gnu.org; Sat, 24 Sep 2011 20:03:28 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R7cCQ-00079T-4M for bug-gnu-emacs@gnu.org; Sat, 24 Sep 2011 20:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Sep 2011 00:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6339 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6339-submit@debbugs.gnu.org id=B6339.131690900327443 (code B ref 6339); Sun, 25 Sep 2011 00:04:02 +0000 Original-Received: (at 6339) by debbugs.gnu.org; 25 Sep 2011 00:03:23 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7cBm-00078Z-Mo for submit@debbugs.gnu.org; Sat, 24 Sep 2011 20:03:23 -0400 Original-Received: from mail-pz0-f50.google.com ([209.85.210.50]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7cBj-00078Q-HX for 6339@debbugs.gnu.org; Sat, 24 Sep 2011 20:03:21 -0400 Original-Received: by pzk37 with SMTP id 37so11428908pzk.9 for <6339@debbugs.gnu.org>; Sat, 24 Sep 2011 17:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=xlRKf+SnC/8RJZfxhe5NWm+mv/7dPkeRLcVa5oierFQ=; b=oBQGocx1Ws4ZWOMx5LveoC6elrzfNfnnQBrXP7xtXNgM51iuVT9LVmR9CkkS6lEUU9 0MXNdD56I5846PE92/5wVD2zGNJ3Z1orVLO0CKReiZ9GyEur9dNP2BjYuMbG2Zoqw1RD e/nvnxSmYMRzUdVz4/39Vym46fzKmyQGGMWUY= Original-Received: by 10.68.19.100 with SMTP id d4mr19177672pbe.34.1316908964093; Sat, 24 Sep 2011 17:02:44 -0700 (PDT) Original-Received: by 10.142.223.13 with HTTP; Sat, 24 Sep 2011 17:02:03 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 24 Sep 2011 20:04:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:51804 Archived-At: On Sun, Sep 25, 2011 at 01:42, Andreas Schwab wrote= : > If you interpret the local part as an absolute > file name you have to prepend a slash after decomposing. =C2=A0If not, th= en > file:///etc/hosts wouldn't work as probably intended. Of course. But that's not the point. The point is that how do you interpret the local part is only important *after* decomposing the URI. It's not url-generic-parse-url's task to do any interpretation. Its docstring says just this: Return an url-struct of the parts of url. The CL-style struct contains the following fields: TYPE USER PASSWORD HOST PORTSPEC FILENAME TARGET ATTRIBUTES FULLNESS. It says nothing of interpreting any of it, and specifically FILENAME, POSIX-style. And if it does interpret it POSIX-style it is wreaking havoc with Windows file: URIs (that's the whole point of this bug report). So, of course I agree with you when you say "If you interpret the local part as an absolute file name you have to prepend a slash after decomposing.", or more precisely, with what Lennart said previously: > This is not about absolute path in the platform syntax. It is an > absolute path as understood as part of an URL. That has to be > translated to a platform path. But this discussion is not about how to use the decomposed URI, is about whether the decomposition is correct, or buggy (and so should be fixed). I think the RFCs (the one I quoted and the ones you quoted) show clearly that the current decomposition is erroneous, though convenient for POSIX systems. At this point, I can see only two options: - Fix the bug, and fix also the places where the return value of url-generic-parse-url / url-filename is assumed to be a POSIX absolute path. - Leave it as is, and implement some ad hoc hack to make it work with Windows file: URIs. =C2=A0 =C2=A0 Juanma