2019-12-16 19:23:08 -05:00
|
|
|
;;; lang/org/contrib/jupyter.el -*- lexical-binding: t; -*-
|
|
|
|
;;;###if (featurep! +jupyter)
|
|
|
|
|
2019-12-18 10:18:58 -05:00
|
|
|
(use-package! ob-jupyter
|
2019-12-16 19:23:08 -05:00
|
|
|
:defer t
|
|
|
|
:init
|
|
|
|
(after! ob-async
|
|
|
|
(pushnew! ob-async-no-async-languages-alist "jupyter-python" "jupyter-julia"))
|
|
|
|
|
|
|
|
(add-hook! '+org-babel-load-functions
|
|
|
|
(defun +org-babel-load-jupyter-h (lang)
|
2019-12-18 10:18:58 -05:00
|
|
|
(when (string-prefix-p "jupyter-" (symbol-name lang))
|
|
|
|
(let ((lang (string-remove-prefix "jupyter-" (symbol-name lang))))
|
|
|
|
(unless (assoc lang org-src-lang-modes)
|
|
|
|
(require (intern (format "ob-%s" lang))
|
|
|
|
nil t)))
|
|
|
|
(with-demoted-errors "Jupyter: %s"
|
|
|
|
(require 'ob-jupyter nil t))))))
|