From 865a9a218af3fd01756712c3d378e47d536ca785 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 3 Jan 2021 08:38:17 -0600 Subject: Add newer Org to load-path before tangling This fixes a problem where, if config.org was newer than config.el, Emacs would require the Org that comes with Emacs, which is older and breaks exporting, at least to Markdown. Adding the newer Org to the load path loads the newer Org instead. --- config.org | 3 +++ init.el | 3 +++ 2 files changed, 6 insertions(+) diff --git a/config.org b/config.org index 365a230..7e10af8 100644 --- a/config.org +++ b/config.org @@ -1537,6 +1537,9 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m (conf-org (concat conf ".org"))) (unless (and (file-newer-than-file-p conf-el conf-org) (load conf 'no-error)) + ;; A plain require here just loads the older `org' in Emacs' install dir. We + ;; need to add the newer one to the `load-path', hopefully that's all. + (add-to-list 'load-path (expand-file-name "straight/build/org/")) (require 'org) (org-babel-load-file conf-org))) #+END_SRC diff --git a/init.el b/init.el index faef4d4..eb25e2e 100644 --- a/init.el +++ b/init.el @@ -12,5 +12,8 @@ (conf-org (concat conf ".org"))) (unless (and (file-newer-than-file-p conf-el conf-org) (load conf 'no-error)) + ;; A plain require here just loads the older `org' in Emacs' install dir. We + ;; need to add the newer one to the `load-path', hopefully that's all. + (add-to-list 'load-path (expand-file-name "straight/build/org/")) (require 'org) (org-babel-load-file conf-org))) -- cgit 1.4.1-21-gabe81