aboutsummaryrefslogtreecommitdiff
path: root/tests/test-org-agenda-config-commands.el
Commit message (Collapse)AuthorAgeFilesLines
* fix(org-agenda): hoist cj/timeformat out of the defun it was buried inCraig Jennings2026-07-161-0/+84
| | | | | | | | | | | | | | | | | | cj/timeformat was defvar'd inside cj/add-timestamp-to-org-entry, so the symbol wasn't special until the command had run once. Until then a let around the call bound it lexically and never reached the function. I moved it to top level with a docstring. It has no other callers. The nested defvar also poisons tests. ERT runs alphabetically, so an earlier test that calls the command makes the symbol special retroactively. A later special-variable-p check then passes on test ordering rather than on the code, reading green in a full-file run and red in isolation. The new guard snapshots special-variable-p into a defconst at load, before any test body runs. I filled in the missing coverage: point and the following line survive the insert, empty and unicode time strings, an empty buffer, and a read-only buffer signalling rather than dropping the stamp. The empty-string case pins a trailing space (current behavior, characterized rather than changed).
* refactor(org-agenda): drop OVERDUE block, lead with the scheduleCraig Jennings2026-06-151-0/+18
| | | | | | The daily F8 agenda opened with an OVERDUE block that re-listed every past-due scheduled or deadline task. Those items already show in the SCHEDULE block on today's line, since org-scheduled-past-days and org-deadline-past-days are both 10000. The OVERDUE section was pure duplication. I removed it and moved SCHEDULE to the top so the calendar leads the view. The now-dead cj/org-agenda-skip-subtree-if-not-overdue helper, its header defvar, and the nine tests covering it are gone too.
* test(org-agenda-config): cover scan-files, todo-list wrappers, main-display, ↵Craig Jennings2026-05-141-0/+162
add-timestamp