summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gratz <Stromeko@nexgo.de>2013-08-12 21:12:16 +0200
committerEric Schulte <schulte.eric@gmail.com>2013-08-12 13:18:23 -0600
commit75f73e0b87a5441e2e8638db71cfd61855333d25 (patch)
treeca5e18cbd943d0d7516cce1aea84c3c7d7f9324c
parentcf8cc35ec55e1c309495c760c1e392bf12506c61 (diff)
downloadorg-mode-75f73e0b87a5441e2e8638db71cfd61855333d25.tar.gz
ob-python
From 8f3c510f43e458a1bbb58b126fc4e402007e6cfe Mon Sep 17 00:00:00 2001 From: Achim Gratz <Stromeko@Stromeko.DE> Date: Mon, 12 Aug 2013 21:10:27 +0200 Subject: [PATCH] ob-python: run-python requires argument cmd * lisp/ob-python.el: Supply non-optional argument `cmd' to all invocations of `run-python'. Invert a condition of to remove an expendable progn form. 46d05e4d08 corrected the signatore in the declaration of run-python, but the call without an argument was left in.
-rw-r--r--lisp/ob-python.el23
1 files changed, 11 insertions, 12 deletions
diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index ec24177..17da109 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -179,21 +179,20 @@ then create. Return the initialized session."
(require org-babel-python-mode)
(save-window-excursion
(let* ((session (if session (intern session) :default))
- (python-buffer (org-babel-python-session-buffer session)))
+ (python-buffer (org-babel-python-session-buffer session))
+ (cmd (if (member system-type '(cygwin windows-nt ms-dos))
+ (concat org-babel-python-command " -i")
+ org-babel-python-command)))
(cond
((and (eq 'python org-babel-python-mode)
(fboundp 'run-python)) ; python.el
- (if (version< "24.1" emacs-version)
- (progn
- (unless python-buffer
- (setq python-buffer (org-babel-python-with-earmufs session)))
- (let ((python-shell-buffer-name
- (org-babel-python-without-earmufs python-buffer)))
- (run-python
- (if (member system-type '(cygwin windows-nt ms-dos))
- (concat org-babel-python-command " -i")
- org-babel-python-command))))
- (run-python)))
+ (if (not (version< "24.1" emacs-version))
+ (run-python cmd)
+ (unless python-buffer
+ (setq python-buffer (org-babel-python-with-earmufs session)))
+ (let ((python-shell-buffer-name
+ (org-babel-python-without-earmufs python-buffer)))
+ (run-python cmd))))
((and (eq 'python-mode org-babel-python-mode)
(fboundp 'py-shell)) ; python-mode.el
;; Make sure that py-which-bufname is initialized, as otherwise