From: Andy Moreton <andrewjmoreton@gmail.com>
To: 20237@debbugs.gnu.org
Subject: bug#20237: Emacs built on Windows cannot figure out path correctly
Date: Sat, 04 Apr 2015 15:34:26 +0100 [thread overview]
Message-ID: <86a8yoq7wt.fsf@gmail.com> (raw)
In-Reply-To: <551ADED4.4010903@gmail.com>
On Sat 04 Apr 2015, Eli Zaretskii wrote:
>> From: Andy Moreton <andrewjmoreton@gmail.com>
>> 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 <zhangda82@gmail.com>
>> >>
>> >> 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)))))
next prev parent reply other threads:[~2015-04-04 14:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-31 17:52 bug#20237: Emacs built on Windows cannot figure out path correctly Da Zhang
2015-03-31 18:24 ` Eli Zaretskii
2015-03-31 21:24 ` Da Zhang
2015-04-01 2:40 ` Eli Zaretskii
2015-04-01 13:50 ` Da Zhang
2015-04-04 10:34 ` Eli Zaretskii
[not found] ` <55201ACF.2080001@gmail.com>
2015-04-04 17:23 ` Eli Zaretskii
[not found] ` <552022E4.7000008@gmail.com>
2015-04-04 17:49 ` Eli Zaretskii
2015-04-04 18:06 ` Da Zhang
2015-04-04 18:12 ` Eli Zaretskii
2015-04-04 18:18 ` Da Zhang
2015-04-04 18:38 ` Eli Zaretskii
2015-04-04 18:44 ` Eli Zaretskii
2015-04-04 19:06 ` Eli Zaretskii
2015-04-04 20:15 ` Da Zhang
2015-04-04 21:12 ` Eli Zaretskii
2015-04-04 19:07 ` Da Zhang
2015-03-31 22:46 ` Andy Moreton
2015-04-04 10:35 ` Eli Zaretskii
2015-04-04 14:34 ` Andy Moreton [this message]
2015-04-04 15:07 ` Eli Zaretskii
2016-06-02 2:54 ` Noam Postavsky
2016-06-04 9:15 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86a8yoq7wt.fsf@gmail.com \
--to=andrewjmoreton@gmail.com \
--cc=20237@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.