Skip to content

Commit 4dff42f

Browse files
ericsfragayantar92
authored andcommitted
lisp/ob-julia.el: Fix session support for Julia
* ob-julia.el (org-babel-julia-evaluate-session, commentary): Add line to initialize ESS so that Julia sessions work. Also added text in commentary about Julia packages that sessions require. Fix contributed by Stephen Eglen. See discussion: https://stat.ethz.ch/pipermail/ess-help/2022-August/013113.html.
1 parent 70a311b commit 4dff42f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lisp/ob-julia.el

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
;; Org-Babel support for evaluating julia code
2727
;;
2828
;; Based on ob-R.el by Eric Schulte and Dan Davison.
29+
;;
30+
;; Session support requires the installation of the DataFrames and CSV
31+
;; Julia packages.
2932

3033
;;; Code:
3134
(require 'cl-lib)
@@ -62,6 +65,7 @@
6265
(defvar ess-current-process-name) ; dynamically scoped
6366
(defvar ess-local-process-name) ; dynamically scoped
6467
(defvar ess-eval-visibly-p) ; dynamically scoped
68+
(defvar ess-local-customize-alist); dynamically scoped
6569
(defun org-babel-edit-prep:julia (info)
6670
(let ((session (cdr (assq :session (nth 2 info)))))
6771
(when (and session
@@ -281,7 +285,8 @@ last statement in BODY, as elisp."
281285
(value
282286
(with-temp-buffer
283287
(insert (org-babel-chomp body))
284-
(let ((ess-local-process-name
288+
(let ((ess-local-customize-alist t)
289+
(ess-local-process-name
285290
(process-name (get-buffer-process session)))
286291
(ess-eval-visibly-p nil))
287292
(ess-eval-buffer nil)))

0 commit comments

Comments
 (0)