GNU bug report logs - #54721
29.0.50; browse-url-file-url fails on Windows since e06319b

Previous Next

Package: emacs;

Reported by: Kiên Nguyễn Quang <kien.n.quang <at> gmail.com>

Date: Tue, 5 Apr 2022 06:58:02 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.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 54721 in the body.
You can then email your comments to 54721 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-gnu-emacs <at> gnu.org:
bug#54721; Package emacs. (Tue, 05 Apr 2022 06:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kiên Nguyễn Quang <kien.n.quang <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 05 Apr 2022 06:58:02 GMT) Full text and rfc822 format available.

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

From: Kiên Nguyễn Quang <kien.n.quang <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; browse-url-file-url fails on Windows since e06319b
Date: Tue, 5 Apr 2022 15:57:40 +0900
[Message part 1 (text/plain, inline)]
Error:
*(error "ShellExecute failed: The system cannot find the file specified.")*

It's because e06319b is using `file-name-split` which will discard the
driver name in Windows.
For example:
(file-name-split "c:/Data/projects/notes/techs/.burlIU3pav.html")
# Output: ("" "Data" "projects" "notes" "techs" ".burlIU3pav.html")

Since the driver name is discarded, the constructed URL is
"file:///Data/projects/notes/techs/.burlIU3pav.html", which does not
exist and cannot be opened.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54721; Package emacs. (Wed, 06 Apr 2022 00:31:02 GMT) Full text and rfc822 format available.

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

From: Kiên Nguyễn Quang <kien.n.quang <at> gmail.com>
To: 54721 <at> debbugs.gnu.org
Subject: Re: bug#54721: Acknowledgement (29.0.50; browse-url-file-url fails on
 Windows since e06319b)
Date: Wed, 6 Apr 2022 09:30:38 +0900
[Message part 1 (text/plain, inline)]
The proposed fix is attached.

On Tue, Apr 5, 2022 at 3:58 PM GNU bug Tracking System <help-debbugs <at> gnu.org>
wrote:

> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>  bug-gnu-emacs <at> gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 54721 <at> debbugs.gnu.org.
>
> Please do not send mail to help-debbugs <at> gnu.org unless you wish
> to report a problem with the Bug-tracking system.
>
> --
> 54721: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=54721
> GNU Bug Tracking System
> Contact help-debbugs <at> gnu.org with problems
>


-- 
 Nguyen Quang Kien - グエン クアン キエン
 Software Developer @ MSD
[Message part 2 (text/html, inline)]
[0001-Make-file-name-split-returns-driver-name-as-well-in-.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54721; Package emacs. (Wed, 06 Apr 2022 05:41:01 GMT) Full text and rfc822 format available.

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

From: Kiên Nguyễn Quang <kien.n.quang <at> gmail.com>
To: 54721 <at> debbugs.gnu.org
Subject: Re: bug#54721: Acknowledgement (29.0.50; browse-url-file-url fails on
 Windows since e06319b)
Date: Wed, 6 Apr 2022 14:39:44 +0900
[Message part 1 (text/plain, inline)]
Update patch.

On Wed, Apr 6, 2022 at 9:30 AM Kiên Nguyễn Quang <kien.n.quang <at> gmail.com>
wrote:

> The proposed fix is attached.
>
> On Tue, Apr 5, 2022 at 3:58 PM GNU bug Tracking System <
> help-debbugs <at> gnu.org> wrote:
>
>> Thank you for filing a new bug report with debbugs.gnu.org.
>>
>> This is an automatically generated reply to let you know your message
>> has been received.
>>
>> Your message is being forwarded to the package maintainers and other
>> interested parties for their attention; they will reply in due course.
>>
>> Your message has been sent to the package maintainer(s):
>>  bug-gnu-emacs <at> gnu.org
>>
>> If you wish to submit further information on this problem, please
>> send it to 54721 <at> debbugs.gnu.org.
>>
>> Please do not send mail to help-debbugs <at> gnu.org unless you wish
>> to report a problem with the Bug-tracking system.
>>
>> --
>> 54721: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=54721
>> GNU Bug Tracking System
>> Contact help-debbugs <at> gnu.org with problems
>>
>
>
>
[Message part 2 (text/html, inline)]
[0001-Make-file-name-split-returns-driver-name-as-well-in-.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54721; Package emacs. (Wed, 06 Apr 2022 10:00:03 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Kiên Nguyễn Quang <kien.n.quang <at> gmail.com>
Cc: 54721 <at> debbugs.gnu.org
Subject: Re: bug#54721: 29.0.50; browse-url-file-url fails on Windows since
 e06319b
Date: Wed, 06 Apr 2022 11:59:48 +0200
Kiên Nguyễn Quang <kien.n.quang <at> gmail.com> writes:

> -          (push "" components)
> +          (push (if (string-empty-p dir) "" (substring dir 0 -1)) components)

Thanks; applied with some changes.

> +    (let ((url-unreserved-chars `(?: ,@url-unreserved-chars)))
> +      (setq file (mapconcat #'url-hexify-string
> +                            (file-name-split file)
> +                            "/"))))

This isn't quite correct, because we do want to encode : characters in
file names in general -- just not the first bit on Windows.  So I've
adjusted the patch and pushed to Emacs 29.

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




bug marked as fixed in version 29.1, send any further explanations to 54721 <at> debbugs.gnu.org and Kiên Nguyễn Quang <kien.n.quang <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 06 Apr 2022 10:01:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 04 May 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 45 days ago.

Previous Next


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