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: Tue, 29 Nov 2016 20:35:46 -0500 Message-ID: <1949fc46-fd26-dddb-86b2-ab3478587271@gmail.com> References: <83polk3qow.fsf@gnu.org> <83inra13r3.fsf@gnu.org> <8337ic29y0.fsf@gnu.org> <87r35wj4b8.fsf@users.sourceforge.net> <83zikkzytf.fsf@gnu.org> <8737i9iz28.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nN0wNDNeHuIOp6hKSmaavGHKX4MHi0UlP" X-Trace: blaine.gmane.org 1480470428 6734 195.159.176.226 (30 Nov 2016 01:47:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2016 01:47:08 +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: npostavs@users.sourceforge.net, Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 30 02:47:04 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 1cBtzE-0000k5-4K for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Nov 2016 02:47:04 +0100 Original-Received: from localhost ([::1]:40301 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBtzE-0005yY-MD for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Nov 2016 20:47:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBtpa-0005qc-2O for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2016 20:37:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBtpW-0005Pl-5H for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2016 20:37:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59525) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cBtpW-0005Pf-1u for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2016 20:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cBtpV-0007vB-Ny for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2016 20:37: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: Wed, 30 Nov 2016 01:37: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: confirmed Original-Received: via spool by 25025-submit@debbugs.gnu.org id=B25025.148046977430388 (code B ref 25025); Wed, 30 Nov 2016 01:37:01 +0000 Original-Received: (at 25025) by debbugs.gnu.org; 30 Nov 2016 01:36:14 +0000 Original-Received: from localhost ([127.0.0.1]:46691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cBtok-0007u4-Gj for submit@debbugs.gnu.org; Tue, 29 Nov 2016 20:36:14 -0500 Original-Received: from mout.kundenserver.de ([217.72.192.73]:52522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cBtoi-0007to-Pc for 25025@debbugs.gnu.org; Tue, 29 Nov 2016 20:36:13 -0500 Original-Received: from [18.189.106.208] ([18.189.106.208]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.184]) with ESMTPSA (Nemesis) id 0M09nw-1czaYI21K0-00uKEY; Wed, 30 Nov 2016 02:35:54 +0100 In-Reply-To: <8737i9iz28.fsf@users.sourceforge.net> X-Provags-ID: V03:K0:/KzlNr59yDzxOoSQJ6A81L0UBjVTsmYKDLAZJkAQdsMl7O+oA6N 2ch0beOZ9IMV5mfj7fHe0K0bI7LPcQP0BJy6Hr6eVtXcji2BtRdbks7LHMeJF0iuhHijCLw i0kJ4ZTNsoZA/IM1T2WfHhD/D2TwNcDzzrWNfG5OF3hSxSc+rYY3W30CITGTRp0uYFUiZdj rb32ZKlCaY3OmR8O0U5JQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:1SrZl51Dpmk=:Fg3QGa6KS4O0mPawM1SiMh tmQdgsq6Yt3M9S1LzU5ojYjNOhqrnH/3y7kJzry6iOiMD4FUnOUuEAs95p9uDNC4DuyEJFRA6 toCahST4XHErzRCFMRs3DfbR8sbNo4vhK+eVSsoGEbWdZ+7dioFWZLW4VnMG3Y5gwg30CBjEa 74KQ4l2cheSeFg8uVkcBkth+ChbEgjhgCbHPKn1VYcnXwUcA7lzaEoHy8bbwgsoq5lbWe97OO oQsRWJoFF2bjs3qrA+C50EmCC4InhObe0aL4IjcDdmKE8/ahnkOQYwqUFDAotIs9UaRI2wdnA VKyS/AnKAKCt/wtRgF8Q4t6c15UhUpeKCwLxmr9DWIj+W+t6v5StWF/mhtWF987onscD5qiU+ E5IEx8cLKtcUR3sDBSPCypZvKu3R7zDsKaE06tB35qCeMamw5RuWJpvbjs3dGB69ZZRdvfztE hUIIcQAcNOw5CBhHlaVZTHw1fnsnUAO4AslkJQ7J0FyJwqu+NczgZZwaFGXMDRPZObqeyAtl0 gADOgSiW+hczUxWwJD5F8iigNrRCFBLiDmHDJeydranCKtkvb9sksgmOndEy0ZcSCGtW9QfYN 4KTwStlr4wxYbqVigbQuRykIKTe4R/uxcuSW8e1e70yi2dyy4cBoENio/KVaYiPqjV6ByebGp fJghVS6IvzEih99zVBg7FJIAq48aVJhHQy0D1RMP9woRtqve0rz0hJeq4BcXE+8Anowg= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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:126281 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --nN0wNDNeHuIOp6hKSmaavGHKX4MHi0UlP Content-Type: multipart/mixed; boundary="vNSFdnr2Nd1TE2w82h54ikMEIx8Ohw7JR"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: npostavs@users.sourceforge.net, Eli Zaretskii Cc: 25025@debbugs.gnu.org Message-ID: <1949fc46-fd26-dddb-86b2-ab3478587271@gmail.com> Subject: Re: bug#25025: python-shell-calculate-command is wrong References: <83polk3qow.fsf@gnu.org> <83inra13r3.fsf@gnu.org> <8337ic29y0.fsf@gnu.org> <87r35wj4b8.fsf@users.sourceforge.net> <83zikkzytf.fsf@gnu.org> <8737i9iz28.fsf@users.sourceforge.net> In-Reply-To: <8737i9iz28.fsf@users.sourceforge.net> --vNSFdnr2Nd1TE2w82h54ikMEIx8Ohw7JR Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2016-11-29 19:36, npostavs@users.sourceforge.net wrote: > Eli Zaretskii writes: >=20 >>> From: npostavs@users.sourceforge.net >>> Cc: 25025@debbugs.gnu.org, clement.pit@gmail.com >>> Date: Sun, 27 Nov 2016 11:06:03 -0500 >>> >>>> Why does it need to be split? A shell command can (even should) be >>>> handed to the shell as a single string. >>> >>> Currently it's not a shell command, because a shell isn't being used.= >>> My other suggestion was to use a shell: >>> >>>>> It might be more intuitive to actually use a shell and then the use= r >>>>> would enter a shell command (though inserting a shell into things >>>>> might bring more complications). >> >> If it doesn't use a shell, then it has no business quoting commands or= >> their parts using shell-related APIs. >> >> So yes, I think using a shell would be TRT here. Can someone please >> work on a patch in that direction? This problem exists for a long >> time, so I hope we could solve it soon. >=20 > Hmm, the difficulty in using a shell is that the current code wants to > parse the command into interpreter and arguments in order to match > against `python-shell-completion-native-disabled-interpreters'. That doesn't prevent us from using a shell. We run the command unmodifie= d through a shell, and we split it and analyze it separately to decide wh= ether to enable completion. But we don't split and reassemble it before = running it. Cl=E9ment. --vNSFdnr2Nd1TE2w82h54ikMEIx8Ohw7JR-- --nN0wNDNeHuIOp6hKSmaavGHKX4MHi0UlP 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 iQIcBAEBCAAGBQJYPiz3AAoJEPqg+cTm90wjSaYP/ihGVozLiIXst+IYXefwYmSM tuHarYz7N52gYBp8fkktwJynMgw6eXVnZYEtKB3mM8E4pk72QeaQj7S+mcvafrmO cADIuJrSIaH6y10M7ANDC3mtE19H+HiZTiRXkJjo5sgNBd1yHvHgAbGLt4HloRFm ootk36kiHXgSek/bY3M6upyCpc/K1DycUuUGA4GLYxklmHCzrD9SC+gain0kr1A3 ucZnbVPNXupEZ2yiSv6SMUVEqaVqrre5Yld4LoAzC3xi4/x1JKtNdbuGt8RA59DA XeIgiZKwFcoZHmjtQQV2nk13BsCFnfLnEyG997PB5a8XlH3n7iNlmLe++sJmvZSE FyI9h3cBdDXA5Q058pLtpSoZNn3+EqYyEbG4LwGGkALSHoSMU8rkyvhYj//8XXno AkdlMQJLoErON+RTGu5ISL5bxt6qrInE4O4fJDclg2wLN7UwO/sr/dbnDLl0gJVy iJNkczqgF/DDKnnSkHnlUxTuG1Peo3nhqeOrLY2mpJn2DWtlLupDRcjBdzpzX+wU KZSgpeawSEl6foxpu2P/WI5sFMFWCGucrOEriMsG01JCK92k/c1xzuNVI8MEjnkn FKxJk7OJGGWAHDuQwcxjjSiLZ+Io9h9XhR7J3ZAsCvh3ThmMy37JHFx2ywDpuJ1c nsRVhPQhtxXnFjKTa+gr =Jzkt -----END PGP SIGNATURE----- --nN0wNDNeHuIOp6hKSmaavGHKX4MHi0UlP--