GNU bug report logs - #1020
url-expand-file-name expands wrongly on Windows

Previous Next

Package: emacs;

Reported by: Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>

Date: Wed, 24 Sep 2008 12:30:03 UTC

Severity: normal

Done: Jason Rumney <jasonr <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1020 in the body.
You can then email your comments to 1020 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1020; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>
To: bug-gnu-emacs <at> gnu.org
Subject: url-expand-file-name expands wrongly on Windows
Date: Wed, 24 Sep 2008 14:19:34 +0200 ()
In GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600)
 of 2008-09-06 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

the problem described in
<http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-03/msg00123.html>
still occurs.

  (url-expand-file-name "test" ["http" nil nil "www.gnu.org" 80 "/" nil nil t])

  --> "http://www.gnu.org/c:/test";


  (url-http-expand-file-name
   [nil nil nil nil nil "test" nil nil nil]
   ["http" nil nil "www.gnu.org" 80 "/" nil nil t])

  --> "/c:/test"

url-http-expand-file-name is an alias for url-default-expander; this
could be changed.

But currently the function url-default-expander calls the function
expand-file-name while canonicalizing URLs. This is not a good idea on
Windows because there the drive letter will be inserted.





bug reassigned from package `emacs' to `emacs,url'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Wed, 24 Sep 2008 17:15:03 GMT) Full text and rfc822 format available.

bug reassigned from package `emacs,url' to `emacs,url'. Request was from Magnus Henoch <mange <at> freemail.hu> to control <at> emacsbugs.donarmstrong.com. (Thu, 25 Sep 2008 12:40:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#1020; Package emacs,url. (Tue, 13 Jan 2009 02:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Tue, 13 Jan 2009 02:15:02 GMT) Full text and rfc822 format available.

Message #14 received at 1020 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "Stefan Monnier" <monnier <at> iro.umontreal.ca>
Cc: "Klaus Straubinger" <KSNetz <at> usenet.arcornews.de>,
        1020 <at> debbugs.gnu.org
Subject: Re: url-default-expander expands wrongly on Windows
Date: Tue, 13 Jan 2009 03:09:00 +0100
On Thu, Mar 27, 2008 at 14:54, Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:

>> the function url-default-expander calls expand-file-name which
>> inserts interesting but wrong drive letters into URLs when called
>> on Windows.
>
> Can you show an example so as to help us understand the problem?

ELISP> (url-expand-file-name "test" "http://www.gnu.org/")
"http://www.gnu.org/c:/test"
ELISP> (url-expand-file-name "test" "http://www.gnu.org")
"http://www.gnu.org/c:/emacs/lisp/url/test"
ELISP> (url-expand-file-name "/test" "http://www.gnu.org/")
"http://www.gnu.org/test"
ELISP> (url-expand-file-name "/test" "http://www.gnu.org")
"http://www.gnu.org/test"


    Juanma




Reply sent to Jason Rumney <jasonr <at> gnu.org>:
You have taken responsibility. (Sat, 21 Feb 2009 08:10:04 GMT) Full text and rfc822 format available.

Notification sent to Klaus Straubinger <KSNetz <at> UseNet.ArcorNews.DE>:
bug acknowledged by developer. (Sat, 21 Feb 2009 08:10:04 GMT) Full text and rfc822 format available.

Message #19 received at 1020-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jason Rumney <jasonr <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>,
        1020-done <at> debbugs.gnu.org
Cc: Klaus Straubinger <KSNetz <at> usenet.arcornews.de>
Subject: Re: bug#1020: url-default-expander expands wrongly on Windows
Date: Sat, 21 Feb 2009 16:00:03 +0800
Juanma Barranquero wrote:
>>> the function url-default-expander calls expand-file-name which
>>> inserts interesting but wrong drive letters into URLs when called
>>> on Windows.
>>>       
> ELISP> (url-expand-file-name "test" "http://www.gnu.org/")
> "http://www.gnu.org/c:/test"
> ELISP> (url-expand-file-name "test" "http://www.gnu.org")
> "http://www.gnu.org/c:/emacs/lisp/url/test"
> ELISP> (url-expand-file-name "/test" "http://www.gnu.org/")
> "http://www.gnu.org/test"
> ELISP> (url-expand-file-name "/test" "http://www.gnu.org")
> "http://www.gnu.org/test"
>   

I have changed url-default-expand to use concat instead of 
expand-file-name to avoid this bug.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Sat, 21 Mar 2009 14:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 246 days ago.

Previous Next


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