From e958410cbc14d2bfa0f97890aafe38031e082aa7 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 11 May 2026 17:17:53 -0500 Subject: fix(calendar-sync): give the no-init .ics worker its module load-path The async .ics-to-Org worker runs `emacs --batch --no-site-file --no-site-lisp' and loads `calendar-sync.el' by absolute path, but that doesn't make its sibling `(require 'cj-org-text-lib)' resolvable, so the conversion died with "Cannot open load file: cj-org-text-lib". `calendar-sync--worker-command' now inserts `-L ' before `-l calendar-sync.el', which keeps the worker isolated from `init.el' while letting it load its local module deps. Updated the worker-command test and added a regression test that runs the real no-init worker shape. --- modules/calendar-sync.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/calendar-sync.el b/modules/calendar-sync.el index 74b2e5c6..62d1b5f1 100644 --- a/modules/calendar-sync.el +++ b/modules/calendar-sync.el @@ -1282,7 +1282,8 @@ processes, not direct interactive use." (defun calendar-sync--worker-command (ics-file output-file) "Build the batch Emacs command that converts ICS-FILE to OUTPUT-FILE." - (let ((private-config-file + (let ((module-dir (file-name-directory calendar-sync--module-file)) + (private-config-file (make-temp-name (expand-file-name "calendar-sync-worker-config-" temporary-file-directory))) (state-file @@ -1294,6 +1295,7 @@ processes, not direct interactive use." "--no-site-lisp" "--eval" (format "(setq load-prefer-newer t calendar-sync-auto-start nil calendar-sync-private-config-file %S calendar-sync--state-file %S)" private-config-file state-file) + "-L" module-dir "-l" calendar-sync--module-file "--eval" (format "(calendar-sync--batch-convert-file %S %S %S %S '%S)" ics-file -- cgit v1.2.3