summaryrefslogtreecommitdiff
path: root/modules/user-constants.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-02-21 15:17:16 -0600
committerCraig Jennings <c@cjennings.net>2026-02-21 15:17:16 -0600
commitdf7cd0e30a2f338948a84c023422252c5f7ad63b (patch)
treec819cee2b5bfddd50717b8e88138d4c766d66a21 /modules/user-constants.el
parent7fe268c8cfe1017fd24a02e3eae29632b1fdeb26 (diff)
fix(user-constants): create calendar data files on first launchHEADmain
org-agenda-list prompts interactively for missing files, which hangs the async subprocess chime uses to fetch events. Create empty placeholders at init so calendar-sync can populate them on first sync.
Diffstat (limited to 'modules/user-constants.el')
-rw-r--r--modules/user-constants.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/user-constants.el b/modules/user-constants.el
index 717e179e..b1f6016b 100644
--- a/modules/user-constants.el
+++ b/modules/user-constants.el
@@ -142,6 +142,12 @@ Stored in .emacs.d/data/ so each machine syncs independently from Proton Calenda
"The location of the org file containing DeepSat Calendar information.
Stored in .emacs.d/data/ so each machine syncs independently from Google Calendar.")
+;; Ensure calendar data files exist so org-agenda-list doesn't hang
+;; prompting for missing files (calendar-sync populates them on first sync)
+(dolist (f (list gcal-file pcal-file dcal-file))
+ (unless (file-exists-p f)
+ (make-empty-file f t)))
+
(defvar reference-file (expand-file-name "reference.org" org-dir)
"The location of the org file containing reference information.")