all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#55429: 27.1; browse-url-of-dired-file fails to open file with '#' character
@ 2022-05-15 13:33 Ivo Tadeu
  2022-05-15 15:34 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Ivo Tadeu @ 2022-05-15 13:33 UTC (permalink / raw)
  To: 55429

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)






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#55429: 27.1; browse-url-of-dired-file fails to open file with '#' character
  2022-05-15 13:33 bug#55429: 27.1; browse-url-of-dired-file fails to open file with '#' character Ivo Tadeu
@ 2022-05-15 15:34 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-15 15:34 UTC (permalink / raw)
  To: Ivo Tadeu; +Cc: 55429

Ivo Tadeu <ivotade@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-15 15:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-15 13:33 bug#55429: 27.1; browse-url-of-dired-file fails to open file with '#' character Ivo Tadeu
2022-05-15 15:34 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.