GNU bug report logs -
#26014
25.1; `browse-url-of-buffer' fails on Windows 10 if the path contains spaces
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
It seems that w32-shell-execute cannot handle file://-URIs with url-escaped
spaces, causing browse-url-of-file to fail. I observed this issue when
trying to to markdown-export-and-preview from markdown-mode.el, but the
issue also occurs with browse-url-of-buffer.
To reproduce, create a file C-x f c:/tmp/file with spaces.html and execute M-:
(browse-url-of-buffer).
It will generate the backtrace
Debugger entered--Lisp error: (error "ShellExecute failed: Das System
kann die angegebene Datei nicht finden.")
w32-shell-execute("open" "file:///c:/tmp/a%20file%20with%20spaces.html")
browse-url-default-windows-browser("file:///c:/tmp/a%20file%20with%20spaces.html"
nil)
apply(browse-url-default-windows-browser
"file:///c:/tmp/a%20file%20with%20spaces.html" nil)
browse-url-default-browser("file:///c:/tmp/a%20file%20with%20spaces.html" nil)
apply(browse-url-default-browser
"file:///c:/tmp/a%20file%20with%20spaces.html" nil)
browse-url("file:///c:/tmp/a%20file%20with%20spaces.html")
browse-url-of-file("c:/tmp/a file with spaces.html")
browse-url-of-buffer()
For reference, calling
(browse-url "file:///c:/tmp/a file with spaces.html")
works as intended.
------------------------------
In GNU Emacs 25.1.1 (x86_64-w64-mingw32)
of 2016-09-17 built on KAEL
Windowing system distributor 'Microsoft Corp.', version 10.0.14393
Configured using:
'configure --prefix=/tmp/emacs --without-imagemagick 'CFLAGS=-O2
-fomit-frame-pointer -g0''
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS
[Message part 2 (text/html, inline)]
This bug report was last modified 8 years and 168 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.