GNU bug report logs - #55429
27.1; browse-url-of-dired-file fails to open file with '#' character

Previous Next

Package: emacs;

Reported by: Ivo Tadeu <ivotade <at> gmail.com>

Date: Sun, 15 May 2022 15:32:01 UTC

Severity: normal

Found in version 27.1

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 55429 in the body.
You can then email your comments to 55429 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#55429; Package emacs. (Sun, 15 May 2022 15:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivo Tadeu <ivotade <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 15 May 2022 15:32:02 GMT) Full text and rfc822 format available.

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

From: Ivo Tadeu <ivotade <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; browse-url-of-dired-file fails to open file with '#' character
Date: Sun, 15 May 2022 10:33:46 -0300
When you use W in a dired buffer to open a file with the '#' character,
the file doesn't get opened. In my limited testing, the problem appears 
to be in the function `browse-url-file-url':

(browse-url-file-url "/home/ivo/tmp/file with spaces.txt")
 => "file:///home/ivo/tmp/file%20with%20spaces.txt"

(browse-url-file-url "/home/ivo/tmp/file with #.txt")
 => "file:///home/ivo/tmp/file%20with%20#.txt"

When I use xdg-open directly with these urls, the second one will
fail. It appears that the '#' should also be percent-encoded.

Tested with emacs -Q


In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, 
cairo version 1.16.0)
 of 2021-03-27, modified by Debian built on x86-conova-01
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55429; Package emacs. (Sun, 15 May 2022 15:36:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ivo Tadeu <ivotade <at> gmail.com>
Cc: 55429 <at> debbugs.gnu.org
Subject: Re: bug#55429: 27.1; browse-url-of-dired-file fails to open file
 with '#' character
Date: Sun, 15 May 2022 17:34:53 +0200
Ivo Tadeu <ivotade <at> gmail.com> writes:

> (browse-url-file-url "/home/ivo/tmp/file with #.txt")
>  => "file:///home/ivo/tmp/file%20with%20#.txt"

This has been fixed in Emacs 29:

(browse-url-file-url "/home/ivo/tmp/file with #.txt")
=> "file:///home/ivo/tmp/file%20with%20%23.txt"

-- 
(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 55429 <at> debbugs.gnu.org and Ivo Tadeu <ivotade <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 15 May 2022 15:36: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. (Mon, 13 Jun 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 311 days ago.

Previous Next


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