From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Newsgroups: gmane.emacs.bugs Subject: bug#25025: python-shell-calculate-command is wrong Date: Fri, 25 Nov 2016 09:44:17 -0500 Message-ID: References: <83polk3qow.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qflNML5uGxuI1d2O18viu6FE7DtJ6xj17" X-Trace: blaine.gmane.org 1480085119 31834 195.159.176.226 (25 Nov 2016 14:45:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 Nov 2016 14:45:19 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 Cc: 25025@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 25 15:45:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cAHkW-0006ya-K1 for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Nov 2016 15:45:12 +0100 Original-Received: from localhost ([::1]:46415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAHkX-0001Z6-6k for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Nov 2016 09:45:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAHkP-0001XI-JO for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2016 09:45:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cAHkM-0000Jv-7F for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2016 09:45:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54147) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cAHkM-0000Jk-46 for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2016 09:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cAHkL-0002N9-RT for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2016 09:45:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Nov 2016 14:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25025-submit@debbugs.gnu.org id=B25025.14800850789076 (code B ref 25025); Fri, 25 Nov 2016 14:45:01 +0000 Original-Received: (at 25025) by debbugs.gnu.org; 25 Nov 2016 14:44:38 +0000 Original-Received: from localhost ([127.0.0.1]:41313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cAHjy-0002MK-1h for submit@debbugs.gnu.org; Fri, 25 Nov 2016 09:44:38 -0500 Original-Received: from mout.kundenserver.de ([217.72.192.73]:62141) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cAHjv-0002M6-Uw for 25025@debbugs.gnu.org; Fri, 25 Nov 2016 09:44:36 -0500 Original-Received: from [18.189.106.208] ([18.189.106.208]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.184]) with ESMTPSA (Nemesis) id 0M1GfI-1cywTt0Aq8-00tE7H; Fri, 25 Nov 2016 15:44:29 +0100 In-Reply-To: <83polk3qow.fsf@gnu.org> X-Provags-ID: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precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:126087 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qflNML5uGxuI1d2O18viu6FE7DtJ6xj17 Content-Type: multipart/mixed; boundary="sHRF6iWwk7hkemOsSCF12N2FBGJ0uC689"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: Eli Zaretskii Cc: 25025@debbugs.gnu.org Message-ID: Subject: Re: bug#25025: python-shell-calculate-command is wrong References: <83polk3qow.fsf@gnu.org> In-Reply-To: <83polk3qow.fsf@gnu.org> --sHRF6iWwk7hkemOsSCF12N2FBGJ0uC689 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-11-25 03:32, Eli Zaretskii wrote: >> From: Cl=C3=A9ment Pit--Claudel >> Date: Fri, 25 Nov 2016 02:03:38 -0500 >> >> On 2016-11-25 01:24, Fabrice Popineau wrote: >>> The python shell name is not passed to any underlying shell. >>> It is used to create a process, so it must not be quoted in anyway. >> >> Are you sure? Looking at the code, I see this: >> >> (python-shell-make-comint >> (or cmd (python-shell-calculate-command)) =E2=80=A6) >> >> And python-shell-make-comint does this: >> >> (split-string-and-unquote cmd) >> >> (ok, this is weird). But still, if the command is "C:\Program Files\P= ython\python.exe", then we *do* need the shell quoting, right? >=20 > The quoting needs to be done only where a shell command is created > that is about to be passed to a shell. I believe in this case the > quoting is done too early. Certainly; but it seems like we'll need to modify more than just python-s= hell-calculate-command; in fact, we probably could remove it entirely: th= ere's no need to glue together the command name and its arguments before = passing them to comint, is there? I was just pointing out that Fabrice's solution of writing (format "%s %s" python-shell-interpreter python-shell-interpreter-args)) would probably break things. Won't it? --sHRF6iWwk7hkemOsSCF12N2FBGJ0uC689-- --qflNML5uGxuI1d2O18viu6FE7DtJ6xj17 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYOE5BAAoJEPqg+cTm90wjWugP/iKFOtg9jtgh2Tm/Mbq5/f33 b0h7Uvd+qMI0clhslz1j6lnZ99jIYzU4ZJjNiDKTm2RyU+BvbaIcUIbZ71TYlLRu 6FfksFDheTgdUx8HahZEjk1stj1X4X2lm/4fnCRcL43lV7Kjqv8FA/VlN1V8mXRh UhN/9XSe3qatR4P9OCuZNTThchiOKZ5Y4g/lplPQU0pMMTkuVn/hl55iR1JiXpDH Lx2h6jA98089aeWu5iYfGyo/csTfWx/kRVToZ2gPnEv3UzvfNhrBofY4sgy9Vavr 5U4Vs0K3NuB0iZz66aEOfARXXGcsjAUYIjM5OI6a32RiqSTvAjD6SGmdmqW7kMm0 eNQ/BYdih68PmgKXsmAYR/PhGfotPsC/zLApHWYaLCnjPsB+RBN/tllmjxlq2obR jcmM1J/zaAyNdchZ5jsXt5mcuR+k2B2cDXD1oot2hDp7g7anIgLyyvjnJlPV4dGo Pz2SowYEk0gXSVddu3BO3nI4UY0JrS4lqYfT1ZqOvRH+mYyc6sOYoBsNBLXXiUcc VbY/lgJ6fPbTfwm9sS1UmELMj8V+VEsvz6IvF8IWwNfsIpmcrgVWvcDSozFifgEw cyi2KRl+8SACL9WnFQUc6POtj/3mGY5oS2kUYiOBk9GY9SwFIEBqeG+h7gHFP/nw +0K+oskbBroyS4dnbggv =2MDZ -----END PGP SIGNATURE----- --qflNML5uGxuI1d2O18viu6FE7DtJ6xj17--