all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] ob-python: Fix python session initialization
@ 2015-09-30  8:01 Grégoire Jadi
  2015-09-30  8:26 ` Grégoire Jadi
  0 siblings, 1 reply; 3+ messages in thread
From: Grégoire Jadi @ 2015-09-30  8:01 UTC (permalink / raw)
  To: Orgmode

[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]

Hi,

There is a bug in ob-python, the parameters aren't used to initialize
the session. Here is a patch that fixes it.

OK to push ?

* lisp/ob-python.el (org-babel-execute:python): Send params to `org-babel-python-initiate-session'.

It was not possible to configure the sesssion with custom parameters.
For example, the python interpreter with :python
> BEGIN_SRC python :session my-session :python ipython
---
 lisp/ob-python.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index 3a9b8f6..f2e6f66 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -74,7 +74,7 @@ This will typically be either `python' or `python-mode'."
   "Execute a block of Python code with Babel.
 This function is called by `org-babel-execute-src-block'."
   (let* ((session (org-babel-python-initiate-session
-		   (cdr (assoc :session params))))
+		   (cdr (assoc :session params)) params))
          (result-params (cdr (assoc :result-params params)))
          (result-type (cdr (assoc :result-type params)))
 	 (return-val (when (and (eq result-type 'value) (not session))
-- 

-- 
Grégoire Jadi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-29 14:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30  8:01 [PATCH] ob-python: Fix python session initialization Grégoire Jadi
2015-09-30  8:26 ` Grégoire Jadi
2015-10-29 14:08   ` Aaron Ecay

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.