Skip to content

Commit 547bf7d

Browse files
mpereirannicandro
authored andcommitted
Make the jupyter executable configurable
1 parent 17d074e commit 547bf7d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

jupyter-env.el

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ directory is where kernel connection files are written to.
3838
This variable should not be used. To obtain the runtime directory
3939
call the function `jupyter-runtime-directory'.")
4040

41+
(defcustom jupyter-executable "jupyter"
42+
"The `jupyter` command executable."
43+
:type 'string
44+
:group 'jupyter)
45+
4146
(defun jupyter-command (&rest args)
4247
"Run a Jupyter shell command synchronously, return its output.
4348
The shell command run is
@@ -49,7 +54,12 @@ return nil."
4954
(let ((stderr-file (make-temp-file "jupyter"))
5055
(stdout (get-buffer-create " *jupyter-command-stdout*")))
5156
(unwind-protect
52-
(let* ((status (apply #'process-file "jupyter" nil (list stdout stderr-file) nil args))
57+
(let* ((status (apply #'process-file
58+
jupyter-executable
59+
nil
60+
(list stdout stderr-file)
61+
nil
62+
args))
5363
(buffer (find-file-noselect stderr-file)))
5464
(unwind-protect
5565
(with-current-buffer buffer

0 commit comments

Comments
 (0)