fix(literate): use same org install when using CLI
This commit is contained in:
parent
850907ed9a
commit
c82e7455bb
1 changed files with 13 additions and 0 deletions
|
@ -2,5 +2,18 @@
|
|||
|
||||
(load! "autoload")
|
||||
|
||||
(defun +literate-add-installed-org-to-load-path-h ()
|
||||
"Use the straight-installed, not bundled Org."
|
||||
(let ((straight-org-build-dir
|
||||
(doom-path straight-base-dir "straight" straight-build-dir "org"))
|
||||
(straight-org-repo-dir
|
||||
(doom-path straight-base-dir "straight" "repos" "org")))
|
||||
(cond
|
||||
((file-exists-p straight-org-build-dir)
|
||||
(add-to-list 'load-path straight-org-build-dir))
|
||||
((file-exists-p straight-org-repo-dir)
|
||||
(add-to-list 'load-path straight-org-repo-dir)))))
|
||||
|
||||
;; Tangle the user's config.org before 'doom sync' runs
|
||||
(add-hook 'doom-before-sync-hook #'+literate-tangle-h)
|
||||
(add-hook 'doom-before-sync-hook #'+literate-add-installed-org-to-load-path-h)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue