Subject: bug#38526: 26.3; w32-shell-execute fails inside Nextcloud folder

From: Juan Jose Garcia-Ripoll <[email-masked]>
Date: Sun, 08 Dec 2019 17:12:51 +0100

On Sun, 08 Dec 2019 17:43:31 +0100,
Eli Zaretskii wrote:
> 
> > Date: Sun, 08 Dec 2019 12:04:59 +0100
> > From: Juan Jose Garcia-Ripoll <[email-masked]>
> > 
> > I am using org-open-file to open files in dired. This function, for some
> > file types, relies on w32-shell-execute with the "open" verb. This verb
> > fails when the full path contains spaces. For instance, the first instance
> > does not work, while the second does
> > 
> > (w32-shell-execute "open" "c:\\Users\\juanj\\Nextcloud\\some-path\\CV.pdf")
> > 
> > (w32-shell-execute "open" "c:\\Users\\juanj\\another-path\\CV.pdf")
> > 
> > I am reporting this from a rather full image, but the problem also is shown
> > in a bare-bones emacs (emacs -q)
> 
> Not reproducible here, although I tried several PDF documents on 2
> different systems.
> 
> What program is configured on your system to open PDF documents?  Is
> it possible that its configuration is wrong?

I am trying to debug w32-shell-execute, but there are no useful error messages. I am using SumatraPDF, which works fine in all documents.

The only difference is the path: whether the document is inside the Nextcloud folder or not (initially I thought it had to do with spaces in the name, but does not seem the case). I am using this PDF viewer for everything in Emacs (including AucTeX), but also from Windows Shell (Default option in "Open").

To verify, I have done the same test using a Word document
  (w32-shell-execute "open" "c:\\Users\\juanj\\tmp\\Test document.docx")
  (w32-shell-execute "open" "c:\\Users\\juanj\\Nextcloud\\tmp\\Test document.docx")
and the result is the same: both functions return 't but only the first one opens the document...

--
Juan José García Ripoll

Quantum Information and Foundations Group
Institute of Fundamental Physics IFF-CSIC
Calle Serrano 113b, Madrid 28006 Spain
http://quinfog.hbar.es - http://juanjose.garcia.ripoll