From ce70fea17662ef584303ae91fcbec06194c5123e Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 13 Apr 2018 21:57:47 +0200 Subject: Proper session naming for blocks without :session arg --- ob-spice.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ob-spice.org b/ob-spice.org index 3924aeb..6ebfaf9 100644 --- a/ob-spice.org +++ b/ob-spice.org @@ -80,10 +80,11 @@ use batch mode (defun org-babel-spice-initiate-session (&optional session _params) "Initiate a ngspice session. Create comint buffer SESSION running ngspice." - (let ((sessionname (or session "spice"))) ;; set default-directory to start process in other than current dir (make-comint sessionname org-babel-spice-command))) + (let* ((sessionname (if (or (not session) (string= session "none")) + "spice" session)) (defun org-babel-prep-session:spice (session params) "Prepare SESSION according to header arguments in PARAMS." (let ((session (org-babel-spice-initiate-session session)) -- cgit v1.2.3