lang/org: refactor & reformat
To ensure that users' after! blocks have precendence over org packages in sub-modules.
This commit is contained in:
parent
52dc5001bc
commit
92dd66f736
2 changed files with 12 additions and 17 deletions
|
@ -111,9 +111,6 @@
|
|||
if (funcall fn (eq (car p) key))
|
||||
collect p))
|
||||
|
||||
(when (featurep! +ipython)
|
||||
(load! "contrib/ipython"))
|
||||
|
||||
;; Fixes for various babel plugins
|
||||
(setq org-babel-js-function-wrapper "console.log(require('util').inspect(function(){\n%s\n}()));"))
|
||||
|
||||
|
@ -836,13 +833,14 @@ compelling reason, so..."
|
|||
(message "`org' was already loaded by the time lang/org loaded, this may cause issues")
|
||||
(run-hooks 'org-load-hook))
|
||||
|
||||
:config
|
||||
(add-hook 'org-open-at-point-functions #'doom|set-jump)
|
||||
|
||||
;;; Custom org modules
|
||||
(if (featurep! +dragndrop) (load! "contrib/dragndrop"))
|
||||
(if (featurep! +ipython) (load! "contrib/ipython"))
|
||||
(if (featurep! +present) (load! "contrib/present"))
|
||||
|
||||
:config
|
||||
(add-hook 'org-open-at-point-functions #'doom|set-jump)
|
||||
|
||||
;;; Packages
|
||||
(after! toc-org
|
||||
(setq toc-org-hrefify-default "gh")
|
||||
|
|
|
@ -16,22 +16,19 @@
|
|||
'(("\\*ob-ipython.*"
|
||||
:slot 2 :side right :size 100 :height 0.2
|
||||
:select nil :quit nil :transient nil)
|
||||
("^\\*Python"
|
||||
("^ ?\\*Python"
|
||||
:slot 0 :side right :size 100
|
||||
:select nil :quit nil :ttl nil)
|
||||
("\\*Python:.*"
|
||||
:slot 0 :side right :size 100
|
||||
:select nil :quit nil :transient nil)))
|
||||
: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)
|
||||
(advice-add 'org-babel-edit-prep:ipython :override #'+org*org-babel-edit-prep:ipython)
|
||||
(advice-add 'org-babel-execute:ipython :override #'+org*org-babel-execute:ipython)
|
||||
(advice-add 'org-babel-ipython-initiate-session :override #'+org*org-babel-ipython-initiate-session)
|
||||
(advice-add #'ob-ipython--create-repl :override #'+org*ob-ipython--create-repl)
|
||||
(advice-add #'org-babel-edit-prep:ipython :override #'+org*org-babel-edit-prep:ipython)
|
||||
(advice-add #'org-babel-execute:ipython :override #'+org*org-babel-execute:ipython)
|
||||
(advice-add #'org-babel-ipython-initiate-session :override #'+org*org-babel-ipython-initiate-session)
|
||||
|
||||
;; retina resolution image hack
|
||||
(when (eq window-system 'ns)
|
||||
(advice-add 'ob-ipython--write-base64-string :around #'+org*ob-ipython--write-base64-string))
|
||||
(when IS-MAC
|
||||
(advice-add #'ob-ipython--write-base64-string :around #'+org*ob-ipython--write-base64-string))
|
||||
|
||||
;; ipython has its own async keyword, disable ipython in ob-async.
|
||||
(after! ob-async
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue