From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#20237: Emacs built on Windows cannot figure out path correctly Date: Sat, 04 Apr 2015 15:34:26 +0100 Message-ID: <86a8yoq7wt.fsf@gmail.com> References: <551ADED4.4010903@gmail.com> <83twx1rpng.fsf@gnu.org> <867ftwyedc.fsf@gmail.com> <831tk0p4ey.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1428158124 4800 80.91.229.3 (4 Apr 2015 14:35:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Apr 2015 14:35:24 +0000 (UTC) To: 20237@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 04 16:35:13 2015 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 1YePAG-0007Oa-KL for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Apr 2015 16:35:12 +0200 Original-Received: from localhost ([::1]:33275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YePAG-0005yn-4e for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Apr 2015 10:35:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YePAA-0005wR-LT for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 10:35:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YePA7-0004pt-CQ for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 10:35:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YePA7-0004pf-9x for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 10:35:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YePA6-0005m1-V2 for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 10:35:03 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <551ADED4.4010903@gmail.com> Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Apr 2015 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20237 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.142815809622176 (code B ref -1); Sat, 04 Apr 2015 14:35:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Apr 2015 14:34:56 +0000 Original-Received: from localhost ([127.0.0.1]:44827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YePA0-0005lc-1I for submit@debbugs.gnu.org; Sat, 04 Apr 2015 10:34:56 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41801) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YeP9x-0005lI-Go for submit@debbugs.gnu.org; Sat, 04 Apr 2015 10:34:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YeP9r-0004ir-FQ for submit@debbugs.gnu.org; Sat, 04 Apr 2015 10:34:48 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:37794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeP9r-0004in-CL for submit@debbugs.gnu.org; Sat, 04 Apr 2015 10:34:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeP9q-0005tl-BH for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 10:34:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YeP9n-0004iV-1u for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 10:34:46 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:49018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeP9m-0004iH-S7 for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 10:34:43 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YeP9k-00071z-Bv for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 16:34:40 +0200 Original-Received: from 82-69-64-228.dsl.in-addr.zen.co.uk ([82.69.64.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 04 Apr 2015 16:34:40 +0200 Original-Received: from andrewjmoreton by 82-69-64-228.dsl.in-addr.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 04 Apr 2015 16:34:40 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 57 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 82-69-64-228.dsl.in-addr.zen.co.uk User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) Cancel-Lock: sha1:Z7D1WcfoxjTTx0UHHvgED8QoQpI= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:101184 Archived-At: On Sat 04 Apr 2015, Eli Zaretskii wrote: >> From: Andy Moreton >> Date: Tue, 31 Mar 2015 23:46:23 +0100 >> >> On Tue 31 Mar 2015, Eli Zaretskii wrote: >> >> >> Date: Tue, 31 Mar 2015 13:52:20 -0400 >> >> From: Da Zhang >> >> >> >> I am using Python mode in Emacs and wanted to start a python >> >> sub-process. >> >> However, Emacs could not find python.exe from the path I specified. >> >> Particularly, the following message was displayed: >> >> apply: Searching for program: no such file or directory, >> >> c\:/Python27/Scripts/ipython.exeInvalid face reference: python-cell >> >> >> >> It seemed a "C\:" was added in front of the path to the python. >> > >> > You didn't say which path of Python did you specify, and how didyou >> > specify it. Please tell, otherwise it's very hard to figure out the >> > reason for the problem. >> >> I have seen something similar - I think it's caused by incorrect >> quoting: >> >> --[python.el]----------------------------------------------------------- >> (defun python-shell-calculate-command () >> "Calculate the string used to execute the inferior Python process." >> (let ((exec-path (python-shell-calculate-exec-path))) >> ;; `exec-path' gets tweaked so that virtualenv's specific >> ;; `python-shell-interpreter' absolute path can be found by >> ;; `executable-find'. >> (format "%s %s" >> ;; FIXME: Why executable-find? >> (shell-quote-argument >> (executable-find python-shell-interpreter)) >> python-shell-interpreter-args))) >> --[python.el]----------------------------------------------------------- >> >> Removing the use of shell-quote-argument seems to work around this >> problem. > > I don't see why quoting here could do any harm. Could you elaborate > on why you think it's wrong? Because removing the shell-quote-argument call fixed it for me: (when (eq system-type 'windows-nt) (setq python-shell-exec-path '("C:/Python27")) (add-function :override (symbol-function 'python-shell-calculate-command) (lambda () (let ((exec-path (python-shell-calculate-exec-path))) (format "%s %s" (executable-find python-shell-interpreter) python-shell-interpreter-args)))))