Browse Source

ob-J: New variable to specify the call to J

* lisp/ob-J.el (org-babel-J-command): New custom variable
  `org-babel-J-command' to store the command to call J.
Marco Wahl 8 years ago
parent
commit
bb91f138b9
1 changed files with 8 additions and 1 deletions
  1. 8 1
      lisp/ob-J.el

+ 8 - 1
lisp/ob-J.el

@@ -30,6 +30,13 @@
 
 ;;; Code:
 (require 'ob)
+
+
+(defcustom org-babel-J-command
+  "jconsole"
+  "Command to call J."
+  :group 'org-babel
+  :type 'string)
 
 (declare-function org-trim "org" (s &optional keep-lead))
 (declare-function j-console-ensure-session "ext:j-console" ())
@@ -75,7 +82,7 @@ This function is called by `org-babel-execute-src-block'"
 	 (progn
 	   (with-temp-file tmp-script-file
 	     (insert full-body))
-	   (org-babel-eval (format "jconsole < %s" tmp-script-file) ""))
+	   (org-babel-eval (format "%s < %s" org-babel-J-command tmp-script-file) ""))
        (org-babel-J-eval-string full-body)))))
 
 (defun org-babel-J-eval-string (str)