diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-31 11:04:42 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-31 11:04:42 -0500 |
| commit | 445a0be315f3d6fff585f1558262fb5dacd10d12 (patch) | |
| tree | ca12cae724f4516f30e3e0995436bb89fef6ed71 /modules/org-config.el | |
| parent | 37f21839ca62617fef07684b2f98268de47a71c2 (diff) | |
| download | dotemacs-445a0be315f3d6fff585f1558262fb5dacd10d12.tar.gz dotemacs-445a0be315f3d6fff585f1558262fb5dacd10d12.zip | |
feat(agenda): refresh the render cache on a timer, without the daemon
The surface reading this has to stay correct while Emacs is down, and
emacsclient is exactly the thing that cannot. So the writer is a batch
Emacs and a user timer runs it every five minutes.
- scripts/agenda-render-cache writes the cache from a batch Emacs. It
resolves the agenda file list through the config's own resolver rather
than restating it, so adding a calendar source stays a one-place change.
- The timer uses OnCalendar so Persistent actually applies. On a monotonic
schedule it is silently ignored, and a machine that slept would come back
to a stale file with nothing to trigger a catch-up.
- The window is now three days, yesterday through tomorrow. A consumer
drawing a rolling window centred on now has nothing to draw for the part
of its span outside today, which late in the evening is half the surface.
The keyword list moved to user-constants, where a batch Emacs can reach it
without this config's package dependencies. Without it org did not
recognise DOING or VERIFY, so it stopped parsing those headlines as tasks
at all: the keyword and priority cookie stayed glued to the front of every
title and each row reported no keyword and not-done. The file parsed
cleanly and was wrong, which is the failure worth guarding.
The bats tests run against a fixture and this checkout, not the machine's
real agenda and installed config. Asserting over live data let the same
suite pass on a day that happened to have no keyworded entries.
Diffstat (limited to 'modules/org-config.el')
| -rw-r--r-- | modules/org-config.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/org-config.el b/modules/org-config.el index a9fc4811..55fdf1d0 100644 --- a/modules/org-config.el +++ b/modules/org-config.el @@ -16,6 +16,7 @@ ;;; Code: (require 'keybindings) ;; provides cj/custom-keymap (used in :init below) +(require 'user-constants) ;; provides cj/org-todo-keywords (used in :config) ;; Declare org variables and functions used before org is loaded so this module ;; byte-compiles standalone. Plain `defvar' (no value) marks the symbol special @@ -284,10 +285,9 @@ a no-op identical-state transition (see `cj/org--noop-state-log-p')." "All org-todo related settings are grouped and set in this function." ;; logging task creation, task start, and task resolved states - (setq org-todo-keywords '((sequence "TODO(t)" "PROJECT(p)" "DOING(i)" - "WAITING(w)" "VERIFY(v)" "STALLED(s)" - "DELEGATED(x)" "|" - "FAILED(f!)" "DONE(d!)" "CANCELLED(c!)"))) + ;; Defined in user-constants so a batch Emacs can load the sequence without + ;; this module's package dependencies. See `cj/org-todo-keywords'. + (setq org-todo-keywords cj/org-todo-keywords) ;; Keyword and priority faces are defined and wired in org-faces-config.el ;; (loaded just after this module): each keyword and priority maps to its own |
