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.

Full log


View this message in rfc822 format

From: Ivo Tadeu <ivotade <at> gmail.com>
To: 55429 <at> debbugs.gnu.org
Subject: bug#55429: 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)





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

Previous Next


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