From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Gr=C3=A9goire?= Jadi Subject: [PATCH] ob-python: Fix python session initialization Date: Wed, 30 Sep 2015 10:01:38 +0200 Message-ID: <87wpv8xrml.fsf@univ-nantes.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhCQL-00018H-3A for emacs-orgmode@gnu.org; Wed, 30 Sep 2015 04:07:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhCQG-0003ye-ND for emacs-orgmode@gnu.org; Wed, 30 Sep 2015 04:07:37 -0400 Received: from smtptls2-lmb.cpub.univ-nantes.fr ([193.52.103.111]:45919 helo=smtp-tls.univ-nantes.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhCQG-0003yN-Gi for emacs-orgmode@gnu.org; Wed, 30 Sep 2015 04:07:32 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp-tls.univ-nantes.fr (Postfix) with ESMTP id A393E401753 for ; Wed, 30 Sep 2015 10:01:39 +0200 (CEST) Received: from smtp-tls.univ-nantes.fr ([127.0.0.1]) by localhost (smtptls2-lmb.cpub.univ-nantes.fr [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rUjEHMQ4OmCI for ; Wed, 30 Sep 2015 10:01:39 +0200 (CEST) Received: from localhost (ipcop.lina.sciences.univ-nantes.fr [193.52.105.131]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp-tls.univ-nantes.fr (Postfix) with ESMTPSA id 7DD0B40174C for ; Wed, 30 Sep 2015 10:01:39 +0200 (CEST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Orgmode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-p= ython-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 =2D-- 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 =2D-- 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 =2D (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)) =2D-=20 =2D-=20 Gr=C3=A9goire Jadi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWC5biAAoJEBNzVHcrZRiU1aQP/iJwLsKIPjGfUUTZ4T0BsdQ7 UD/+96Uo3RXqwWSsQYhFonx8YcN1DPc69OFzPXk9KvTCG8Yf+nCCtJ4Vg+WWCrD6 ke5O3at+JnYFRY5M2IKTXD8b3aWN4U07k7n07CTuBRb6tyAMDKDiLLcWYjQ5YrHr aXhCwi8az6+WB0+uvM95DGIWyv9wS990GcL4gmkIedQqfQuBa/TN5KQGQRnIf7aM gVb1gZZVS35tX8FveLSZ9Cahs/s37kSKqxRw1CaUqbWpgI6tpXtRf30FutlVigvp 9V4ArrhqOZ7mOHv2+zY+QL/uXRxbeMQjbqHwB61cnG4zspQ0yE89I0bOLxQFmf8t e7IQig0YH7Mems0LFBJt4oOJ6EBIrSK95P7CCOP+uS9Q0yIqFCG0SUZHMog0OSeH YCg2ODyF3vscQxYj8LWVXhvAncUcJogq6PVxbXZee7iRpZWvn1Rp5BfV08BMWFet /gON0C7oJSX3/B0ho4pONONX3KMna3pDEz+OW0yOBSWb4SJaSHystoL4vcqg4E3x 8i7QBk/pMTjII90a+oGnV0VkY9rMGT8CW3jHakc44DY/8Xq8VohCZUL0KAMq5lWm QlPLyMUad6v8TxnnS9d9KZRTorNFrmxAlKXYuiJCOawrYhUGdH3iZZQN9tZIzSJe lO5r8BwMiThy6h7h3tE4 =2iia -----END PGP SIGNATURE----- --=-=-=--