diff options
| author | Szymon Szukalski <szymon@szymonszukalski.com> | 2026-04-13 09:31:13 +1000 |
|---|---|---|
| committer | Szymon Szukalski <szymon@szymonszukalski.com> | 2026-04-13 09:31:13 +1000 |
| commit | 711adc6148fc5b97e752a8461b4036b0cb6e9f35 (patch) | |
| tree | 1366a5754dca14151369c58d93d4c765e7331577 /init.el | |
| parent | 0c2980f337ca6440507fb518f2649a921791130e (diff) | |
Add upfront Org layout validation
Diffstat (limited to 'init.el')
| -rw-r--r-- | init.el | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -13,6 +13,23 @@ (file-name-directory (or load-file-name user-init-file default-directory)))) +(defun ss-validate-org-layout () + "Warn once at startup when required Org workflow paths are missing." + (let ((missing-paths nil)) + (unless (file-directory-p org-directory) + (push org-directory missing-paths)) + (unless (file-exists-p org-default-notes-file) + (push org-default-notes-file missing-paths)) + (when missing-paths + (display-warning + 'ss-org + (format + "Missing required Org workflow paths: %s. Org workflow features may not work as expected." + (mapconcat #'identity (nreverse missing-paths) ", ")) + :warning)))) + +(add-hook 'emacs-startup-hook #'ss-validate-org-layout) + ;; -------------------------------------------------- ;; Startup: agenda as modal view ;; -------------------------------------------------- @@ -142,8 +159,7 @@ ("C-c r" . org-refile)) :init (setq org-agenda-files - (delq nil (list (and (file-exists-p org-default-notes-file) - org-default-notes-file))) + (list org-default-notes-file) org-agenda-custom-commands '(("h" "Home" ((agenda "" |
