about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-01-03 08:38:17 -0600
committerCase Duckworth2021-01-03 08:40:35 -0600
commit865a9a218af3fd01756712c3d378e47d536ca785 (patch)
treeffee3473391a982a9e22b10aad35d4342cf27089
parentFix header args (diff)
downloademacs-865a9a218af3fd01756712c3d378e47d536ca785.tar.gz
emacs-865a9a218af3fd01756712c3d378e47d536ca785.zip
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.
-rw-r--r--config.org3
-rw-r--r--init.el3
2 files changed, 6 insertions, 0 deletions
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
1537 (conf-org (concat conf ".org"))) 1537 (conf-org (concat conf ".org")))
1538 (unless (and (file-newer-than-file-p conf-el conf-org) 1538 (unless (and (file-newer-than-file-p conf-el conf-org)
1539 (load conf 'no-error)) 1539 (load conf 'no-error))
1540 ;; A plain require here just loads the older `org' in Emacs' install dir. We
1541 ;; need to add the newer one to the `load-path', hopefully that's all.
1542 (add-to-list 'load-path (expand-file-name "straight/build/org/"))
1540 (require 'org) 1543 (require 'org)
1541 (org-babel-load-file conf-org))) 1544 (org-babel-load-file conf-org)))
1542 #+END_SRC 1545 #+END_SRC
diff --git a/init.el b/init.el index faef4d4..eb25e2e 100644 --- a/init.el +++ b/init.el
@@ -12,5 +12,8 @@
12 (conf-org (concat conf ".org"))) 12 (conf-org (concat conf ".org")))
13 (unless (and (file-newer-than-file-p conf-el conf-org) 13 (unless (and (file-newer-than-file-p conf-el conf-org)
14 (load conf 'no-error)) 14 (load conf 'no-error))
15 ;; A plain require here just loads the older `org' in Emacs' install dir. We
16 ;; need to add the newer one to the `load-path', hopefully that's all.
17 (add-to-list 'load-path (expand-file-name "straight/build/org/"))
15 (require 'org) 18 (require 'org)
16 (org-babel-load-file conf-org))) 19 (org-babel-load-file conf-org)))