all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#26014: 25.1; `browse-url-of-buffer' fails on Windows 10 if the path contains spaces
@ 2017-03-07 15:53 Klaus-Dieter Bauer
  2017-03-07 16:39 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Klaus-Dieter Bauer @ 2017-03-07 15:53 UTC (permalink / raw)
  To: 26014

[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 5616 bytes --]

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

* bug#26014: 25.1; `browse-url-of-buffer' fails on Windows 10 if the path contains spaces
  2017-03-07 15:53 bug#26014: 25.1; `browse-url-of-buffer' fails on Windows 10 if the path contains spaces Klaus-Dieter Bauer
@ 2017-03-07 16:39 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2017-03-07 16:39 UTC (permalink / raw)
  To: Klaus-Dieter Bauer; +Cc: 26014

> From: Klaus-Dieter Bauer <bauer.klaus.dieter@gmail.com>
> Date: Tue, 7 Mar 2017 16:53:41 +0100
> 
> 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

Thanks, I think I fixed that now.





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

end of thread, other threads:[~2017-03-07 16:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-07 15:53 bug#26014: 25.1; `browse-url-of-buffer' fails on Windows 10 if the path contains spaces Klaus-Dieter Bauer
2017-03-07 16:39 ` Eli Zaretskii

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.