Conditionally add jupyter to org-babel if ob-jupyter is available

This commit is contained in:
Evie Litherland-Smith 2024-06-03 18:16:53 +01:00
parent cb736088c0
commit d253d7258d

25
init.el
View file

@ -596,10 +596,7 @@ it will be tried first."
(org-M-RET-may-split-line '((default . nil) (org-M-RET-may-split-line '((default . nil)
(headline . nil) (headline . nil)
(item . nil) (item . nil)
(table . t))) (table . t))))
(org-babel-load-languages '((emacs-lisp . t)
(lua . t)
(python . t))))
(use-package org-faces (use-package org-faces
:after org :after org
@ -654,6 +651,24 @@ it will be tried first."
:custom :custom
(org-babel-python-command "python3")) (org-babel-python-command "python3"))
(use-package ob-jupyter
:after (ob-core jupyter))
(with-eval-after-load 'org
(let (babel-languages)
(when (require 'ob-jupyter nil :noerror)
(push '(jupyter . t) babel-languages))
(push '(lua . t) babel-languages)
(push '(python . t) babel-languages)
(push '(emacs-lisp . t) babel-languages)
(org-babel-do-load-languages
'org-babel-load-languages
babel-languages)
)
)
(use-package org-capture (use-package org-capture
:after org :after org
:bind :bind
@ -1041,8 +1056,6 @@ Calls `project-remember-project-under' for ~/Projects/"
(require 'nix-store) (require 'nix-store)
(nix-prettify-global-mode +1)) (nix-prettify-global-mode +1))
(use-package lua-mode)
(defun my/enable-fill-column (col) (defun my/enable-fill-column (col)
"Set and enable fill column to `COL'." "Set and enable fill column to `COL'."
(set-fill-column col) (set-fill-column col)