From unknown Mon Aug 18 04:36:15 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#19289 <19289@debbugs.gnu.org> To: bug#19289 <19289@debbugs.gnu.org> Subject: Status: 24.4; Bug in python.el when used in Windows OS Reply-To: bug#19289 <19289@debbugs.gnu.org> Date: Mon, 18 Aug 2025 11:36:15 +0000 retitle 19289 24.4; Bug in python.el when used in Windows OS reassign 19289 emacs submitter 19289 David Strip severity 19289 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 06 14:08:47 2014 Received: (at submit) by debbugs.gnu.org; 6 Dec 2014 19:08:47 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=BAYES_50,HTML_MESSAGE, MIME_HTML_ONLY,MSGID_FROM_MTA_HEADER,T_DKIM_INVALID autolearn=disabled version=3.3.2 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 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 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 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=; 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= From: David Strip Subject: 24.4; Bug in python.el when used in Windows OS Message-Id: <54831FFF.4090207@stripfamily.net> To: 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 Date: Sat, 06 Dec 2014 15:25:58 +0000 MIME-Version: 1.0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: submit 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---)
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))

--
From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 06 14:37:31 2014 Received: (at 19289) by debbugs.gnu.org; 6 Dec 2014 19:37:31 +0000 Received: from localhost ([127.0.0.1]:55661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XxLAZ-0001p5-2P for submit@debbugs.gnu.org; Sat, 06 Dec 2014 14:37:31 -0500 Received: from mtaout29.012.net.il ([80.179.55.185]:40691) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XxLAX-0001ow-2h for 19289@debbugs.gnu.org; Sat, 06 Dec 2014 14:37:29 -0500 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NG600500E6O8E00@mtaout29.012.net.il> for 19289@debbugs.gnu.org; Sat, 06 Dec 2014 21:34:35 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NG600JGXEDM7C90@mtaout29.012.net.il>; Sat, 06 Dec 2014 21:34:35 +0200 (IST) Date: Sat, 06 Dec 2014 21:36:42 +0200 From: Eli Zaretskii Subject: Re: bug#19289: 24.4; Bug in python.el when used in Windows OS In-reply-to: <54831FFF.4090207@stripfamily.net> X-012-Sender: halo1@inter.net.il To: David Strip Message-id: <83ppbwzi2d.fsf@gnu.org> References: <54831FFF.4090207@stripfamily.net> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 19289 Cc: 19289@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: David Strip > 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 08 20:34:46 2014 Received: (at 19289-done) by debbugs.gnu.org; 9 Dec 2014 01:34:46 +0000 Received: from localhost ([127.0.0.1]:58346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy9hN-000587-UM for submit@debbugs.gnu.org; Mon, 08 Dec 2014 20:34:46 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:36701) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy9hL-00057z-O0 for 19289-done@debbugs.gnu.org; Mon, 08 Dec 2014 20:34:44 -0500 Received: from r186-55-189-92.dialup.adsl.anteldata.net.uy ([186.55.189.92]:58160 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Xy9hK-0006Zw-BP for 19289-done@debbugs.gnu.org; Mon, 08 Dec 2014 20:34:42 -0500 From: fgallina@gnu.org (=?utf-8?Q?Fabi=C3=A1n?= Ezequiel Gallina) To: 19289-done@debbugs.gnu.org Subject: 24.4; Bug in python.el when used in Windows OS Date: Mon, 08 Dec 2014 22:34:38 -0300 Message-ID: <87h9x5zjv5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 19289-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Fixed at c2db939 in the emacs-24 branch. Thanks, Fabi=C3=A1n From unknown Mon Aug 18 04:36:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 06 Jan 2015 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator