Subject: bug#19289: 24.4; Bug in python.el when used in Windows OS

From: Eli Zaretskii <[email-masked]>
Date: Sat, 06 Dec 2014 21:36:42 +0200

> From: David Strip <[email-masked]>
> Date: Sat, 06 Dec 2014 15:25:58 +0000
> 
> In some sense, the root of the problem is locate-file, called by
> executable-find (both defined in files.el). locate-file does not return quoted
> paths. I'm not sure if the best fix is at the locate-files level, since I'm not
> sure what consequences this might have elsewhere, esp on non-Windows OS's.

locate-file is not supposed to quote file names, because it doesn't
know how the file name will be used.

> The
> most localized fix would be in python.el, changing python-shell-parse-command
> to add the required quotes. In the simplest case, this would be just change the
> format statement from
> 
> (format "%s %s"
> 
> to
> 
> (format "\"%s\" %s"

I think python-shell-parse-command should use shell-quote-argument
instead.

Thank you for your report.