From unknown Fri Sep 19 21:15:50 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#26014 <26014@debbugs.gnu.org> To: bug#26014 <26014@debbugs.gnu.org> Subject: Status: 25.1; `browse-url-of-buffer' fails on Windows 10 if the path contains spaces Reply-To: bug#26014 <26014@debbugs.gnu.org> Date: Sat, 20 Sep 2025 04:15:50 +0000 retitle 26014 25.1; `browse-url-of-buffer' fails on Windows 10 if the path = contains spaces reassign 26014 emacs submitter 26014 Klaus-Dieter Bauer severity 26014 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 07 10:54:24 2017 Received: (at submit) by debbugs.gnu.org; 7 Mar 2017 15:54:24 +0000 Received: from localhost ([127.0.0.1]:44760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clHRP-0004PA-PT for submit@debbugs.gnu.org; Tue, 07 Mar 2017 10:54:24 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clHRO-0004Oy-Qu for submit@debbugs.gnu.org; Tue, 07 Mar 2017 10:54:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clHRI-0006rO-N4 for submit@debbugs.gnu.org; Tue, 07 Mar 2017 10:54:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,HTML_OBFUSCATE_05_10,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37175) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1clHRI-0006rJ-Jr for submit@debbugs.gnu.org; Tue, 07 Mar 2017 10:54:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clHRH-0005Ju-95 for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2017 10:54:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clHRG-0006qb-50 for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2017 10:54:15 -0500 Received: from mail-ua0-x234.google.com ([2607:f8b0:400c:c08::234]:36097) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1clHRF-0006q6-Uk for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2017 10:54:14 -0500 Received: by mail-ua0-x234.google.com with SMTP id 72so9061217uaf.3 for ; Tue, 07 Mar 2017 07:54:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=FS7+YpYYRalWXUckIccq0oZvU3/CbZhy8QNyRoKMMF4=; b=T+UmwqnNPgA1lRc6lIjWqsZu3jN3L4f27OyduJzMRcD04ymt0NMCQjOfgwdPXtRMOd MpsRDcfi1dYr8/7zkz0LI0afMkRczRJA8L3KFKgpAnoQf7rIm+aogMwL20Ug9D36bXbi Gz8vmcP7xNlzvuyvta+ISAShTpJv3gmBrfrSbHVW8TMTi6O7j66cecR41S/VDOdoUhz7 nuCjy2+/4DPwSqQsJb/fCn1KTKuhj0UK0dxo7ORu6e5widniEo8CXbN6ZJGgunlYOxIk jqkfLeh7BP8WOiP0RLldIv0VtKtlgJ7a+9rcIKohfBxOO6aOJVbW/fzKYCJp0aniy99d PYbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=FS7+YpYYRalWXUckIccq0oZvU3/CbZhy8QNyRoKMMF4=; b=eyCCMBhWtVnMY+RxBw89JnHmwji1NzbfsXcxUUVYyJUz6F9el1Gg9H/yLm8srFJINi /4YUurW98HrurrbGiOOyJ9+jHFQidLCKdhgGlmkx9o+J9Bf0gJha4y9xtglIaryaoprU olQYf3P1ss8rM9miHEcKT7V/i8+fGdFvCqCDMROiW/N8ywiWTAom334c72QoLA3FZcIy If0ucSJNYDLGurvWhOQNwK+F/epmAxRWL6M7MEu2xdk1Q5eOqFZC9m7vn1y1ib9zt05q THG20XCTZTd67J/yOCrmIEtlBQ+JMrxi9NbEonsLguO3sm6MUREoNbmY41fpMRqM3d69 T2bQ== X-Gm-Message-State: AMke39lkWW5REkabslJsYD6JUmZFp9nXzFXjtEJGiZlxqV38HY1E3Rt0m8pPLv9/mJFMUQk9x5H4iIQe4waAGA== X-Received: by 10.31.199.134 with SMTP id x128mr605228vkf.52.1488902051342; Tue, 07 Mar 2017 07:54:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.126.82 with HTTP; Tue, 7 Mar 2017 07:53:41 -0800 (PST) From: Klaus-Dieter Bauer Date: Tue, 7 Mar 2017 16:53:41 +0100 Message-ID: Subject: 25.1; `browse-url-of-buffer' fails on Windows 10 if the path contains spaces To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=001a11483e7ae03092054a2605b0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a11483e7ae03092054a2605b0 Content-Type: text/plain; charset=UTF-8 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 --001a11483e7ae03092054a2605b0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

It seems that=C2=A0w32-shell-execute=C2=A0cannot han= dle=C2=A0file:= //-URIs with url-escaped spaces, causing=C2=A0browse-url-of-file=C2=A0to fa= il. I observed this issue when trying to to=C2=A0markdown-export-and-preview=C2=A0= from=C2=A0mark= down-mode.el, but the issue also occurs with=C2=A0browse-url-of-buffer.

=

To reproduce, create a file=C2=A0C-x f c:/tmp/file with spaces.html= =C2=A0and execute=C2=A0M-: (browse-url-of-buffer).

It will generat= e the backtrace

Debugger entered--Li=
sp error: (error "ShellExecute failed: Das System kann die angegebene =
Datei nicht finden.")
  w32-shell-execute("open" "file:///c:/tmp/a%20file%20with%2=
0spaces.html")
  browse-url-default-windows-browser("file:///c:/tmp/a%20file%20with%2=
0spaces.html" nil)
  apply(browse-url-default-windows-browser "file:///c:/tmp/a%20file%20=
with%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%20s=
paces.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 fil=
e 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=3D/tmp/emacs --without-imagemagick 'CFLAGS=3D-=
O2
 -fomit-frame-pointer -g0''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS
--001a11483e7ae03092054a2605b0-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 07 11:40:20 2017 Received: (at 26014) by debbugs.gnu.org; 7 Mar 2017 16:40:20 +0000 Received: from localhost ([127.0.0.1]:44805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clI9s-0005YF-06 for submit@debbugs.gnu.org; Tue, 07 Mar 2017 11:40:20 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clI9q-0005Y0-OY for 26014@debbugs.gnu.org; Tue, 07 Mar 2017 11:40:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clI9i-0004UB-Ee for 26014@debbugs.gnu.org; Tue, 07 Mar 2017 11:40:13 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clI9i-0004U4-Ba; Tue, 07 Mar 2017 11:40:10 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4055 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1clI9h-00088Z-JL; Tue, 07 Mar 2017 11:40:10 -0500 Date: Tue, 07 Mar 2017 18:39:41 +0200 Message-Id: <83pohtghwy.fsf@gnu.org> From: Eli Zaretskii To: Klaus-Dieter Bauer In-reply-to: (message from Klaus-Dieter Bauer on Tue, 7 Mar 2017 16:53:41 +0100) Subject: Re: bug#26014: 25.1; `browse-url-of-buffer' fails on Windows 10 if the path contains spaces References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26014 Cc: 26014@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Klaus-Dieter Bauer > 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 08 12:34:39 2017 Received: (at control) by debbugs.gnu.org; 8 Mar 2017 17:34:39 +0000 Received: from localhost ([127.0.0.1]:46577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clfTy-00071B-SU for submit@debbugs.gnu.org; Wed, 08 Mar 2017 12:34:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clfTw-00070y-LH for control@debbugs.gnu.org; Wed, 08 Mar 2017 12:34:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clfTq-0000wA-R3 for control@debbugs.gnu.org; Wed, 08 Mar 2017 12:34:31 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clfTq-0000w6-NF for control@debbugs.gnu.org; Wed, 08 Mar 2017 12:34:30 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1clfTq-00028N-Bh for control@debbugs.gnu.org; Wed, 08 Mar 2017 12:34:30 -0500 Subject: control message for bug 26014 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Wed, 08 Mar 2017 12:34:30 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) # 95f3fd2 close 26014 26.1 From unknown Fri Sep 19 21:15:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 06 Apr 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator