refactor!(org): remove ob-ipython
BREAKING CHANGE: This commit removes the ob-ipython package; it's been deprecated for some time because the upstream package is no longer maintained and is broken on most, common versions of Python anyway. Jupyter is a superior alternative, in any case.
This commit is contained in:
parent
d81f1862f7
commit
b7954f927f
5 changed files with 4 additions and 202 deletions
|
@ -1,41 +0,0 @@
|
|||
;;; lang/org/contrib/babel.el -*- lexical-binding: t; -*-
|
||||
;;;###if (modulep! +ipython)
|
||||
|
||||
(use-package! ob-ipython
|
||||
:defer t
|
||||
:init
|
||||
(defvar +ob-ipython-local-runtime-dir nil)
|
||||
|
||||
(setq ob-ipython-resources-dir ".ob-ipython-resrc")
|
||||
|
||||
(add-hook! '+org-babel-load-functions
|
||||
(defun +org-babel-load-ipython-h (lang)
|
||||
(and (string-prefix-p "jupyter-" (symbol-name lang))
|
||||
(require 'ob-ipython nil t))))
|
||||
|
||||
(after! org-src
|
||||
(add-to-list 'org-src-lang-modes '("ipython" . python)))
|
||||
(after! ox-latex
|
||||
(add-to-list 'org-latex-minted-langs '(ipython "python")))
|
||||
:config
|
||||
(set-popup-rules!
|
||||
'(("\\*ob-ipython.*"
|
||||
:slot 2 :side right :size 100 :height 0.2
|
||||
:select nil :quit nil :ttl nil)
|
||||
("^ \\*Python"
|
||||
:slot 0 :side right :size 100
|
||||
:select nil :quit nil :ttl nil)))
|
||||
|
||||
;; advices for remote kernel and org-src-edit
|
||||
(advice-add #'ob-ipython--create-repl :override #'+org-ob-ipython-create-repl-a)
|
||||
(advice-add #'org-babel-edit-prep:ipython :override #'+org-babel-edit-prep:ipython-a)
|
||||
(advice-add #'org-babel-execute:ipython :before #'+org-babel-execute:ipython-a)
|
||||
(advice-add #'org-babel-ipython-initiate-session :override #'+org-ob-ipython-initiate-session-a)
|
||||
|
||||
;; retina resolution image hack
|
||||
(when (featurep :system 'macos)
|
||||
(advice-add #'ob-ipython--write-base64-string :around #'+org-ob-ipython-write-base64-string-a))
|
||||
|
||||
;; ipython has its own async keyword, disable ipython in ob-async.
|
||||
(after! ob-async
|
||||
(add-to-list 'ob-async-no-async-languages-alist "ipython")))
|
Loading…
Add table
Add a link
Reference in a new issue