feat: load init.el from (org-)notes repo if it exists

This commit is contained in:
Laurens Miers 2024-11-17 19:27:26 +01:00
parent ad0adbc726
commit 7285b8750e

View file

@ -7,10 +7,14 @@
(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)))
(when (file-readable-p custom-file)
(load custom-file))
(when (file-readable-p notes-config-file)
(load notes-config-file))
)