From c0680e6fa30ad80fb91be520f20e98d56076e5a3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 6 Jan 2018 23:58:01 -0500 Subject: [PATCH] lang/org: refactor load-path mods & don't forget it Previously, Doom would forget lang/org's modification of the load-path if you call doom//reload-load-path (which is called when you do package management with an open Emacs session). No more! --- modules/lang/org/init.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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)))