From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#25025: python-shell-calculate-command is wrong Date: Fri, 25 Nov 2016 09:59:43 -0500 Message-ID: References: <83polk3qow.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1480086280 22770 195.159.176.226 (25 Nov 2016 15:04:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 Nov 2016 15:04:40 +0000 (UTC) Cc: 25025@debbugs.gnu.org, =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 25 16:04:35 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 1cAI3E-00053M-Uf for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Nov 2016 16:04:33 +0100 Original-Received: from localhost ([::1]:46480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAI3I-0000bX-BC for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Nov 2016 10:04:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAHyz-0005aA-9M for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2016 10:00:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cAHyt-0008Uy-Hr for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2016 10:00:09 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54430) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cAHyt-0008Us-EW for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2016 10:00:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cAHyt-0002mf-4D for bug-gnu-emacs@gnu.org; Fri, 25 Nov 2016 10:00:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Nov 2016 15:00:03 +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.148008599510653 (code B ref 25025); Fri, 25 Nov 2016 15:00:03 +0000 Original-Received: (at 25025) by debbugs.gnu.org; 25 Nov 2016 14:59:55 +0000 Original-Received: from localhost ([127.0.0.1]:41594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cAHyl-0002lk-BQ for submit@debbugs.gnu.org; Fri, 25 Nov 2016 09:59:55 -0500 Original-Received: from mail-oi0-f67.google.com ([209.85.218.67]:35050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cAHyf-0002lM-IY for 25025@debbugs.gnu.org; Fri, 25 Nov 2016 09:59:53 -0500 Original-Received: by mail-oi0-f67.google.com with SMTP id v84so5253741oie.2 for <25025@debbugs.gnu.org>; Fri, 25 Nov 2016 06:59:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=xeOh+hNRJiqFI1kRHm6z0Df57Ivx3t+yZZHCUqhujaI=; b=zygqi/Yjw+HluFDJrAQwDNH2QW7BikjS65nYBoEETG7hoMEAq5d1OK1rF8PV0bFyNU shIyUW796hzGNcWhgFKQhM1qQ1G5PwhU8r+E03QpIKcQjXzvxuDjF68UBkEHabvIEvV8 PQp0InZKiUF/rxqTrGK9JXjer2i/Zah9gcO76BwPnnZ71IfmOiYtmvG3u+c/d9m/7UjR J+HBS+suuprpif9eD0nGtGP8m29wnQRl6W5aW+89fDBT574oxOSSlZ75POsQYfWkQmD1 +L8suKd+ZQLmic7CeTg095Da0vUonOyRHeGbSM+z8vPXSUgOWYZAvnAXskcXxYsFRuzR Lnug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=xeOh+hNRJiqFI1kRHm6z0Df57Ivx3t+yZZHCUqhujaI=; b=ZRsU9k2vxOnqmVw0xTaH8Q4MxIe9omopCQGyOuD/QfPf7LOo9tYcHJuxGzg7EQdomr 2OWb2seFfiTpk8Nc+Nk8H/gipai59c/keau+fGG4eGP0crBuZK8Dv92T41Eua+bIg4Ur MTIIEzgk/dY9FG+1Y/dpHHHaEXUq1dJdeT5CFAut44A4uamy9e4Q2C/pWfC0DvmR+L5w 4Y5H3TKmJQdETuqJxvBOGKglozSbyK6mVo5hmygAlIyPhL6V/IpWATtX71FSoTj0JCjS UBk6VoYtjophPFtcR5RhOQczHLNy4TkGD1gZGnrU1vvTeIVACoFkd67U7+n9fFVpA79b tttA== X-Gm-Message-State: AKaTC014z2rCCHAipdDcD1y03B4NTOWJEn6hvAHHGbe5A0bHycg0Lh+mnirlJiXX5Ve3ZWe5YQuf3WqnTAKoKw== X-Received: by 10.157.54.245 with SMTP id s50mr4761559otd.181.1480085983637; Fri, 25 Nov 2016 06:59:43 -0800 (PST) Original-Received: by 10.157.4.67 with HTTP; Fri, 25 Nov 2016 06:59:43 -0800 (PST) In-Reply-To: <83polk3qow.fsf@gnu.org> X-Google-Sender-Auth: CslCrOqqywOWrBMp8AOkAuH8mxo 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:126088 Archived-At: merge 25025 20744 quit On Fri, Nov 25, 2016 at 3:32 AM, 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\Pyt= hon\python.exe", then we *do* need the shell quoting, right? > > 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. > I think the whole command should be quoted with combine-and-quote-strings to balance the call to split-string-and-unquote.