From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#6339: url-filename => "/c:/some/file.txt" Date: Thu, 22 Sep 2011 02:40:43 +0200 Message-ID: References: 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 1316652114 9763 80.91.229.12 (22 Sep 2011 00:41:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Sep 2011 00:41:54 +0000 (UTC) Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 22 02:41:49 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 1R6XML-0004lW-Bf for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Sep 2011 02:41:49 +0200 Original-Received: from localhost ([::1]:35712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6XMK-000237-Lx for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Sep 2011 20:41:48 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44797) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6XMH-000232-L9 for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2011 20:41:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6XMG-0003Pp-Jw for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2011 20:41:45 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6XMG-0003Pl-FP for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2011 20:41:44 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R6XMX-0006A1-Td for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2011 20:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lennart Borgman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Sep 2011 00:42:01 +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.131665208823640 (code B ref 6339); Thu, 22 Sep 2011 00:42:01 +0000 Original-Received: (at 6339) by debbugs.gnu.org; 22 Sep 2011 00:41:28 +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 1R6XM0-00069E-91 for submit@debbugs.gnu.org; Wed, 21 Sep 2011 20:41:28 -0400 Original-Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6XLu-000693-My for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 20:41:24 -0400 Original-Received: by fxd18 with SMTP id 18so2069081fxd.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 17:41:04 -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=uBofjUjxtT5nvV9M3bHv6e0l8AJJjWQ4kuftkw3rBpY=; b=fnhXv8JmpX3gEOqKZ4zc4G016wUnvliaDRZXlv8jf2t9TSny+6/R1UtBAoaRoZsDcd nfZEyKD/qhLlMyiRa1jImz1B5Iq7Rf8L+KDNJ4tXjJgpSSPNrOimcAKXXRxV8vjlzNfV ECQj2lq1I+OXXPSLJr0KRgYLhqtu+3Pv01pqM= Original-Received: by 10.223.18.149 with SMTP id w21mr1948357faa.118.1316652064283; Wed, 21 Sep 2011 17:41:04 -0700 (PDT) Original-Received: by 10.152.20.229 with HTTP; Wed, 21 Sep 2011 17:40:43 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 21 Sep 2011 20:42:01 -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:51631 Archived-At: On Thu, Sep 22, 2011 at 02:32, Juanma Barranquero wrote: > On Thu, Sep 22, 2011 at 01:46, Lennart Borgman > wrote: > >> But unfortunately that might not be the right answer... Take this URL fi= le name: >> >> =C2=A0 file:///c:/some/file.txt >> >> On windows that would be "c:/some/file.txt". What would it mean on a >> unix system? I guess it would mean "/c:/some/file.txt", but I am not >> sure. Perhaps that is an invalid file name on unix? > > Quite likely, but IMO you're missing the point. > > file:///c:/some/file.txt is a URL, i.e., it's a pointer to some > specific file in some specific place (or files with identical path and > name in different hosts, because the URL is missing the HOST part, > defaulting then to localhost). In fact, it is the URL that points to a > file, in some filesystem, with absolute path "c:/some/file.txt". Yes, but please remember if you make that interpretation (which I hope is the correct one) then "c:/some/file.txt" is an absolute local file name in URL file name syntax. So if we hold on to that interpretation then maybe we should say (and document ;-) that url-filename returns such a file name and that it needs to be translated to the actually used systems file syntax to be used there. This would be an incompatible change from the current (faulty) behaviour, but I think it would be the best. > Whether that file exists, and whether that path makes sense when you > apply it locally to a POSIX system, i.e., whether you can access a > file with that URL, is irrelevant to the fact that "c:/some/file.txt" > is the path of the URL. You're muddling the waters when you insist in > "context" and "local system" and the like, because that affects to the > *use* of the URL, not its syntax. Splitting a URL into pieces > according to the RFC does not depend on where you do it or how do you > intend to use it. Ah, yes. I think we are saying the same thing about the problem here. > We wouldn't be having this discussion in an alternative world where > the POSIX path separator was still "/", but the good people who wrote > the URI/URL specs had chosen "#" as the field separator in URLs: > file:##HOST#PATH > > =C2=A0file:###c:/some/file.txt =C2=A0vs. =C2=A0file:###some/file.txt > > No one would try to split that as "#some/file.txt". That is a good example.