From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Bug in python.el (at least for Windows OS) Date: Sat, 06 Dec 2014 10:04:56 +0200 Message-ID: <83lhml19w7.fsf@gnu.org> References: <548288E4.2030302@stripfamily.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1417853102 28248 80.91.229.3 (6 Dec 2014 08:05:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Dec 2014 08:05:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Strip Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 06 09:04:55 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XxAMI-0006Zu-S5 for ged-emacs-devel@m.gmane.org; Sat, 06 Dec 2014 09:04:55 +0100 Original-Received: from localhost ([::1]:53691 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxAMI-0005w3-Eg for ged-emacs-devel@m.gmane.org; Sat, 06 Dec 2014 03:04:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxAM9-0005vj-8U for emacs-devel@gnu.org; Sat, 06 Dec 2014 03:04:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XxAM3-0008RO-C0 for emacs-devel@gnu.org; Sat, 06 Dec 2014 03:04:45 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:38097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxAM3-0008RH-3N for emacs-devel@gnu.org; Sat, 06 Dec 2014 03:04:39 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NG500J00I5BEQ00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Sat, 06 Dec 2014 10:04:37 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NG500IGQIFPXZ90@a-mtaout21.012.net.il>; Sat, 06 Dec 2014 10:04:37 +0200 (IST) In-reply-to: <548288E4.2030302@stripfamily.net> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:179107 Archived-At: > From: David Strip > 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. Thanks. Please submit a bug report about that, using the 'report-emacs-bug' command. If you do that from the same version of Emacs where you have the problem, the command will collect some auxiliary information that the maintainers need to be able to diagnose and solve the problem. TIA