emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in python.el (at least for Windows OS)


From: David Strip
Subject: Bug in python.el (at least for Windows OS)
Date: Sat, 06 Dec 2014 04:41:16 +0000

If the path to the python executable contains an embedded space, any command that attempts to spawn a shell will fail with "invalid argument" since the space makes the command appear to contain extra args.
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. 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"
This definitely works on Windows, but I'm not certain how this would affect other OS's. Perhaps the format string has to be conditioned on the OS.

--

reply via email to

[Prev in Thread] Current Thread [Next in Thread]