diff --git a/modules/lang/org/init.el b/modules/lang/org/init.el index 184da000b..52c15127d 100644 --- a/modules/lang/org/init.el +++ b/modules/lang/org/init.el @@ -2,8 +2,10 @@ ;; Ensure ELPA org is prioritized above built-in org. (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)))) + (when-let* ((old-path (locate-library "org" nil doom--base-load-path))) + (setq old-path (substring (file-name-directory old-path) 0 -1)) + (delete old-path load-path) + ;; We remove it from the base load path too so that `doom//reload-load-path' + ;; won't undo this modification. + (delete old-path doom--base-load-path)))