From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Strip Newsgroups: gmane.emacs.bugs Subject: bug#19289: 24.4; Bug in python.el when used in Windows OS Date: Sat, 06 Dec 2014 15:25:58 +0000 Message-ID: <54831FFF.4090207@stripfamily.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1417892974 23667 80.91.229.3 (6 Dec 2014 19:09:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Dec 2014 19:09:34 +0000 (UTC) To: 19289@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 06 20:09:24 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1XxKjK-0007l2-Lq for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Dec 2014 20:09:22 +0100 Original-Received: from localhost ([::1]:55305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxKjK-0000yw-5o for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Dec 2014 14:09:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxKj7-0000xH-D0 for bug-gnu-emacs@gnu.org; Sat, 06 Dec 2014 14:09:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XxKj0-000201-KG for bug-gnu-emacs@gnu.org; Sat, 06 Dec 2014 14:09:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxKj0-0001zx-C1 for bug-gnu-emacs@gnu.org; Sat, 06 Dec 2014 14:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XxKj0-000152-2W for bug-gnu-emacs@gnu.org; Sat, 06 Dec 2014 14:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: David Strip Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Dec 2014 19:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19289 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.14178929274118 (code B ref -1); Sat, 06 Dec 2014 19:09:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Dec 2014 19:08:47 +0000 Original-Received: from localhost ([127.0.0.1]:55600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XxKik-00014L-7V for submit@debbugs.gnu.org; Sat, 06 Dec 2014 14:08:47 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36563) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XxHiW-0003Sz-2s for submit@debbugs.gnu.org; Sat, 06 Dec 2014 10:56:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XxHiO-0006k5-Oi for submit@debbugs.gnu.org; Sat, 06 Dec 2014 10:56:19 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:43519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxHiO-0006jr-LZ for submit@debbugs.gnu.org; Sat, 06 Dec 2014 10:56:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxHiI-0001u7-CH for bug-gnu-emacs@gnu.org; Sat, 06 Dec 2014 10:56:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XxHiC-0006hr-Dr for bug-gnu-emacs@gnu.org; Sat, 06 Dec 2014 10:56:06 -0500 Original-Received: from mail132-26.atl131.mandrillapp.com ([198.2.132.26]:62163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxHiC-0006hT-7C for bug-gnu-emacs@gnu.org; Sat, 06 Dec 2014 10:56:00 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=mandrill; d=mail132-26.atl131.mandrillapp.com; h=From:Sender:Subject:Message-Id:To:Date:MIME-Version:Content-Type:Content-Transfer-Encoding; i=david@mail132-26.atl131.mandrillapp.com; bh=Mh9n4GaANwreIDRWJh+/xXfD2kk=; b=hU4/9/iRRo4ZIBBLpId1aBu103hUcN6UgPBkDoN9z0KKQb3zLw4I4FQxw0mp6r6fLWrKbykg+ZN/ cgmJPsdXDQX3HYeIpGgr+YwhN2Z/KUvfDgrDxANFyFgh0KhR9Q4rROYGpo9IFcNJYx5Z1PLUOvtL /Ad+AghX7zNAaWVlylM= DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=mail132-26.atl131.mandrillapp.com; b=JerGygkRrllB+3As/+a+E2T7pm1chXliid17hCI5dEtTaBVuT3+es2hVcRzAe8BWHEmidDDdg/UI jjCjMIV6Rz7XSbqHTIK0MLNICitAeANZ/eN2inOGWOJ7NsHt++E0pICGLkqHfgcdt3pjqB0q0d3g paSb4r+SQjCbaH+qG/w=; Original-Received: from pmta13.atl01.mandrillapp.com (127.0.0.1) by mail132-26.atl131.mandrillapp.com id hgcjh01sar8b for ; Sat, 6 Dec 2014 15:25:58 +0000 (envelope-from ) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; i=@mandrillapp.com; q=dns/txt; s=mandrill; t=1417879558; h=From : Sender : Subject : Message-Id : To : Date : MIME-Version : Content-Type : Content-Transfer-Encoding : From : Subject : Date : X-Mandrill-User : List-Unsubscribe; bh=mjxicV5yA2hEnu7FYc0OvL6Nd/qTWVINko9qOJFHn0A=; b=hlPBx2cP5DQ9eppsJbc4PEtfLizbJZY08gq8gR/YVcKuqWRXzSh3P+29QaDKDSEpr1v+A2 CuXeIlk695AeOdJAXeQliATjM8t+qhjcyv383VpgVTVOFad5MDsGObIXZI/CwgNJc+qYsZ6T AkmVN/FqKk6yHJbOJmXFY6QfUdUrU= Original-Received: from [184.63.2.196] by mandrillapp.com id 003469fdcedc4705ab2349010aedd371; Sat, 06 Dec 2014 15:25:58 +0000 X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30054788.003469fdcedc4705ab2349010aedd371 X-Mandrill-User: md_30054788 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Sat, 06 Dec 2014 14:08:44 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:96918 Archived-At:
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

=C2=A0=C2=A0=C2=A0 (format "%s %s"
=C2=A0=C2=A0=C2=A0

to

=C2=A0=C2=A0=C2=A0 (format "\"%s\" %s"
=C2=A0=C2=A0=C2=A0

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.



In GNU Emacs 24.4.1 (i686-pc-mingw32)
=C2=A0of 2014-10-24 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
=C2=A0`configure --prefix=3D/c/usr'

Important settings:
=C2=A0 value of $LANG: ENU
=C2=A0 locale-coding-system: cp1252

Major mode: Fundamental

Minor modes in effect:
=C2=A0 recentf-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 buffer-read-only: t
=C2=A0 line-number-mode: t
=C2=A0 transient-mark-mode: t

Recent input:
M-x r e p o r t - b u g <return>

Recent messages:
Loading d:/users/david/.recentf...done
Cleaning up the recentf list...done (0 removed)
Loading align...done
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils bs ido align recentf tree-widget wid-edit
cl-loaddefs cl-lib easymenu time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process w32notify w32
multi-tty emacs)

Memory information:
((conses 8 88734 6887)
=C2=A0(symbols 32 18845 0)
=C2=A0(miscs 32 75 138)
=C2=A0(strings 16 15942 3714)
=C2=A0(string-bytes 1 444542)
=C2=A0(vectors 8 11233)
=C2=A0(vector-slots 4 397125 2824)
=C2=A0(floats 8 71 150)
=C2=A0(intervals 28 246 41)
=C2=A0(buffers 508 12))

--