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))