From d3dc9465dd19f2d6139e06b07bf56eba9d2d6e61 Mon Sep 17 00:00:00 2001 From: Laurens Miers Date: Wed, 30 Apr 2025 09:38:32 +0200 Subject: [PATCH] fix: load init.el of notes repo when org-roam is properly loaded This avoids all kinds of issues about variables not being declared, etc. in the project-notes init.el --- config.org | 1 + init.el | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/config.org b/config.org index 1eb50cd..404cccb 100644 --- a/config.org +++ b/config.org @@ -964,6 +964,7 @@ Preserve indentation in SRC blocks (org-roam-db-autosync-mode) ;; Add todo lists to org-agenda (custom-set-variables '(org-agenda-files (directory-files-recursively org-roam-directory "todo\\.org$"))) + (load (expand-file-name "init.el" org-roam-directory) :no-error-if-file-is-missing) ) #+END_SRC diff --git a/init.el b/init.el index 3d52422..5b96eb9 100644 --- a/init.el +++ b/init.el @@ -7,11 +7,9 @@ (setq custom-file (expand-file-name "custom.el" user-emacs-directory)) ;; This is the actual config file. It is omitted if it doesn't exist so emacs won't refuse to launch. (defvar my-config-file (expand-file-name "config.org" user-emacs-directory)) - (defvar notes-config-file (expand-file-name "init.el" "~/projects/notes/")) (when (file-readable-p my-config-file) (org-babel-load-file (expand-file-name my-config-file))) - (load notes-config-file :no-error-if-file-is-missing) (load custom-file :no-error-if-file-is-missing) )