diff --git a/doom/.config/doom/README.org b/doom/.config/doom/README.org index a769688..896dce3 100644 --- a/doom/.config/doom/README.org +++ b/doom/.config/doom/README.org @@ -3579,8 +3579,9 @@ Saves only project bookmarks without contaminating global list." (saved-alist (copy-tree bookmark-alist))) ;; Save globals first, then load project bookmarks (bookmark-save) - (when (file-exists-p proj-file) - (bookmark-load proj-file t)) + (if (file-exists-p proj-file) + (bookmark-load proj-file t) + (setq bookmark-alist nil)) (bookmark-store name `((filename . ,url)) nil) (bookmark-save nil proj-file) ;; Restore globals @@ -3620,9 +3621,10 @@ Project bookmarks go to .bookmarks file in project root." (record (bookmark-make-record))) ;; Save current globals to disk first (bookmark-save) - ;; Load existing .bookmarks (if any) - (when (file-exists-p proj-file) - (bookmark-load proj-file t)) + ;; Load or init project bookmark alist + (if (file-exists-p proj-file) + (bookmark-load proj-file t) + (setq bookmark-alist nil)) ;; Add new bookmark to alist (bookmark-store name (cdr record) nil) ;; Write ONLY project bookmarks to .bookmarks diff --git a/doom/.config/doom/config.el b/doom/.config/doom/config.el index c865adb..211c1b9 100644 --- a/doom/.config/doom/config.el +++ b/doom/.config/doom/config.el @@ -2649,8 +2649,9 @@ Saves only project bookmarks without contaminating global list." (saved-alist (copy-tree bookmark-alist))) ;; Save globals first, then load project bookmarks (bookmark-save) - (when (file-exists-p proj-file) - (bookmark-load proj-file t)) + (if (file-exists-p proj-file) + (bookmark-load proj-file t) + (setq bookmark-alist nil)) (bookmark-store name `((filename . ,url)) nil) (bookmark-save nil proj-file) ;; Restore globals @@ -2690,9 +2691,10 @@ Project bookmarks go to .bookmarks file in project root." (record (bookmark-make-record))) ;; Save current globals to disk first (bookmark-save) - ;; Load existing .bookmarks (if any) - (when (file-exists-p proj-file) - (bookmark-load proj-file t)) + ;; Load or init project bookmark alist + (if (file-exists-p proj-file) + (bookmark-load proj-file t) + (setq bookmark-alist nil)) ;; Add new bookmark to alist (bookmark-store name (cdr record) nil) ;; Write ONLY project bookmarks to .bookmarks