all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Lars Magne Ingebrigtsen <larsi@gnus.org>, 6339@debbugs.gnu.org
Subject: bug#6339: url-filename => "/c:/some/file.txt"
Date: Sun, 25 Sep 2011 02:02:03 +0200	[thread overview]
Message-ID: <CAAeL0SQzO0Y_9XPH-nyYchta5ri2=LT8iPZGjWyUmkKM0BbbBA@mail.gmail.com> (raw)
In-Reply-To: <m2ty81ld74.fsf@igel.home>

On Sun, Sep 25, 2011 at 01:42, Andreas Schwab <schwab@linux-m68k.org> wrote:

> If you interpret the local part as an absolute
> file name you have to prepend a slash after decomposing.  If not, then
> 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.

    Juanma





  reply	other threads:[~2011-09-25  0:02 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-03  2:38 bug#6339: url-filename => "/c:/some/file.txt" Lennart Borgman
2010-06-03 11:13 ` Juanma Barranquero
2010-07-26 11:50 ` Juanma Barranquero
2010-07-26 12:00   ` Lennart Borgman
2010-08-01 18:46   ` Juanma Barranquero
2010-08-02  7:51     ` Michael Albinus
2011-09-21 20:28   ` Lars Magne Ingebrigtsen
2011-09-21 22:21     ` Juanma Barranquero
2011-09-21 22:31       ` Lennart Borgman
2011-09-21 22:45         ` Juanma Barranquero
2011-09-21 22:51           ` Lennart Borgman
2011-09-21 22:59             ` Juanma Barranquero
2011-09-21 23:15               ` Lennart Borgman
2011-09-21 23:18                 ` Juanma Barranquero
2011-09-21 23:32                   ` Lennart Borgman
2011-09-21 23:37                     ` Juanma Barranquero
2011-09-21 23:46                       ` Lennart Borgman
2011-09-22  0:32                         ` Juanma Barranquero
2011-09-22  0:40                           ` Lennart Borgman
2011-09-22  0:59                             ` Juanma Barranquero
2011-09-22  1:07                               ` Lennart Borgman
2011-09-22  1:14                                 ` Juanma Barranquero
2011-09-22  9:52                                   ` Lennart Borgman
2011-10-06  5:09                                   ` Kevin Rodgers
2011-10-06 11:56                                     ` Juanma Barranquero
2011-10-06 12:43                                       ` Stefan Monnier
2011-10-06 13:40                                         ` Juanma Barranquero
2011-10-06 14:24                                           ` Jason Rumney
2011-10-06 14:30                                             ` Juanma Barranquero
2011-10-06 14:38                                               ` Jason Rumney
2011-10-06 14:49                                                 ` Juanma Barranquero
2011-10-06 15:08                                                 ` Lennart Borgman
2011-10-06 15:08                                                 ` Lennart Borgman
2011-10-06 15:31                                           ` Stefan Monnier
2011-10-06 15:56                                             ` Juanma Barranquero
2011-10-06 16:49                                               ` Stefan Monnier
2011-10-06 16:54                                                 ` Juanma Barranquero
2011-10-06 21:08                                                   ` Stefan Monnier
2011-09-24  3:35                           ` Jason Rumney
2011-09-24  8:59                             ` Juanma Barranquero
2011-09-24  9:06                               ` Juanma Barranquero
2011-09-24 11:53                               ` Andreas Schwab
2011-09-24 21:56                                 ` Juanma Barranquero
2011-09-24 23:42                                   ` Andreas Schwab
2011-09-25  0:02                                     ` Juanma Barranquero [this message]
2011-09-24  9:46                             ` Lennart Borgman
2011-09-24 12:28                             ` Richard Stallman
2012-05-09  9:04   ` Chong Yidong
2012-05-09 11:52     ` Juanma Barranquero
2012-05-10 14:15       ` Chong Yidong

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='CAAeL0SQzO0Y_9XPH-nyYchta5ri2=LT8iPZGjWyUmkKM0BbbBA@mail.gmail.com' \
    --to=lekktu@gmail.com \
    --cc=6339@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=schwab@linux-m68k.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.