From 55ad843a09f9064f38af067da217da2f740cdadd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 5 Jan 2018 13:32:39 -0500 Subject: [PATCH] lang/org: fix byte-compiler using outdated, built-in org #327 During runtime, the new version of org (installed via ELPA) is added to load-path, but this doesn't happen during compile-time. Wrap it in eval-and-compile and that changes. --- modules/lang/org/config.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 422e0ea59..d43e6ccb4 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -4,10 +4,11 @@ "The directory where org files are kept.") ;; Ensure ELPA org is prioritized above built-in org. -(when-let* ((path (locate-library "org" nil doom--base-load-path))) - (setq load-path - (delete (substring (file-name-directory path) 0 -1) - load-path))) +(eval-and-compile + (when-let* ((path (locate-library "org" nil doom--base-load-path))) + (setq load-path + (delete (substring (file-name-directory path) 0 -1) + load-path)))) ;; Sub-modules (if (featurep! +attach) (load! +attach))