aboutsummaryrefslogtreecommitdiff
path: root/tests/test-agenda-query--render.el
Commit message (Collapse)AuthorAgeFilesLines
* test: repair the seven files red under Emacs 31.1HEADmainCraig Jennings12 hours1-2/+9
| | | | | | | | | | | | | None of the seven was a config regression. Each file had its own cause: - config-utilities: the tests mocked fboundp with cl-letf. fset on a subr autoloads comp-run, which requires bytecomp, whose defun of byte-compile-file replaced the mock installed earlier in the same cl-letf. 30.2 hid it because ert happened to load bytecomp first. I extracted cj/--compile-elisp-file with an injectable availability predicate (fboundp by default), made cj/compile-this-elisp-buffer the wrapper, and had the tests inject a predicate instead of redefining a primitive. Added the missing no-compiler case. - system-defaults-functions: the file let-bound use-package-always-ensure before anything declared it special. 30.2 downgraded that to a "Failed to parse package recentf" warning; 31.1 moves the defcustom to autoload time, where it is fatal at load. One defvar before the let. - calibredb-epub-config: the jump tests stubbed calibredb while it was still an autoload, so the module's require loaded the real definition over the stub and the real command always ran. Require calibredb before any stub. - agenda-query--render: org 9.8.7 parses the priority cookie with (looking-at org-priority-regexp), whose lazy prefix swallows everything between the stars and the cookie. The fixture now has no cookie and pins that the keyword is not recognised. - prog-general-yas-activation: python-ts-mode prompts to install a missing grammar, which a batch run cannot answer. The test skips on treesit-ready-p rather than on the mode existing, and the module comment says why. - integration-recurring-events: the fixtures are America/Chicago and the assertions expect Chicago rendering, so the file only passed on a machine in Central time. TZ is pinned in setup and restored in teardown. The integration failure had been invisible since 08-17 because make test stops after a red unit phase. make test exits 0 again for the first time since then.
* feat(agenda): refresh the render cache on a timer, without the daemonCraig Jennings2026-07-311-12/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* feat(agenda): add the renderer output profile and its cache fileCraig Jennings2026-07-311-0/+235
The surface that reads this went live, and it reads a different shape than the canonical profile emits. - cj/agenda-render-json adds s and e in epoch milliseconds, plus t for the title. The canonical fields ride along, so one file serves both readers. - Every row gets an end it can be drawn with. An all-day entry spans its day. A point event has zero width. The canonical profile still reports null there, which is faithful to the source but not a width. - cj/agenda-render-cache-update writes today to the XDG cache path. Input stays epoch seconds on both profiles. Only the output converts, and the guards that catch a milliseconds-for-seconds caller still apply. Nothing schedules the cache write yet, so the file is only as fresh as its last call. Picking a refresh mechanism is its own decision.