aboutsummaryrefslogtreecommitdiff
path: root/modules/cj-org-text.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-10 14:51:53 -0500
committerCraig Jennings <c@cjennings.net>2026-05-10 14:51:53 -0500
commit7833f4ff97edd46d62cea1eeb0405923ec2806cb (patch)
tree36db15ac6a9cff062d660a04b89754d3d5184492 /modules/cj-org-text.el
parenta7071b13d5a3309e28ee03e33acc526d7eaed810 (diff)
downloaddotemacs-7833f4ff97edd46d62cea1eeb0405923ec2806cb.tar.gz
dotemacs-7833f4ff97edd46d62cea1eeb0405923ec2806cb.zip
refactor(org-refile): migrate to cj-cache helper
Phase 5 step 3 of utility-consolidation, second of two cache migrations. Same shape as the agenda migration: drop four state vars, replace the build-with-cache function with a thin wrapper around `cj/cache-value-or-rebuild', extract the slow scan into a pure-ish helper. Add `cj/--org-refile-scan-targets' as the slow filesystem walk (org-roam node enumeration plus 30,000+ todo.org files across code-dir and projects-dir). `cj/build-org-refile-targets' now reads as: detect background-build state, ask the cache helper for the value with the scan helper as BUILD-FN, route the original log lines through :on-hit / :on-build-success. Drop four module-level state vars: - `cj/org-refile-targets-cache' - `cj/org-refile-targets-cache-time' - `cj/org-refile-targets-cache-ttl' - `cj/org-refile-targets-building' Rewrite the existing test file to test wrapper behavior at the contract level (stub the scan helper, verify wrapper outcomes). 8 tests parallel the agenda test set: first-call builds, second-call uses cache, force-rebuild bypass, TTL expiration, empty scan, building-flag cleanup on success and error, and error propagation.
Diffstat (limited to 'modules/cj-org-text.el')
0 files changed, 0 insertions, 0 deletions