GNU bug report logs - #6339
url-filename => "/c:/some/file.txt"

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Thu, 3 Jun 2010 02:40:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 6339 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 6339 <at> debbugs.gnu.org
Subject: Re: bug#6339: url-filename => "/c:/some/file.txt"
Date: Wed, 21 Sep 2011 22:28:17 +0200
Juanma Barranquero <lekktu <at> gmail.com> writes:

> On Thu, Jun 3, 2010 at 04:38, Lennart Borgman <lennart.borgman <at> gmail.com> wrote:
>
>> (setq x (url-generic-parse-url "file:///c:/some/file.txt"))
>> (url-filename x) => "/c:/some/file.txt"
>>
>> Should not that be "c:/some/file.txt"?

[...]

> I'd rather fix it the good way and watch the fireworks.
>
>     Juanma
>
> === modified file 'lisp/url/url-parse.el'
> --- lisp/url/url-parse.el	2010-06-22 16:48:53 +0000
> +++ lisp/url/url-parse.el	2010-07-26 11:46:11 +0000
> @@ -148,4 +148,5 @@
>            ;; 3.3. Path
> +	  (when (looking-at "/") (forward-char 1))
>            ;; Gross hack to preserve ';' in data URLs
>            (setq save-pos (point))

If I say:

(setq x (url-generic-parse-url "file:///home/larsi/foo.txt"))

Then I get

(url-filename x)
=> "/home/larsi/foo.txt"

as expected.  Would your patch break that?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




This bug report was last modified 13 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.