aboutsummaryrefslogtreecommitdiff
path: root/tests/test-org-agenda-config-category.el
Commit message (Collapse)AuthorAgeFilesLines
* fix(agenda): make the project-name category actually applyCraig Jennings2026-07-301-8/+103
| | | | | | | | | | | | | | | | | | | - The override never fired once since it shipped. - Its guard wanted org-category to already equal "todo". - Org leaves that nil and derives the name later. - So the condition was false in every real buffer. The guard now tests for nil, and the hook runs at depth -100. That depth is load-bearing. org-get-category resolves a deferred value the element cache then holds, so any hook reading it first freezes "todo" and leaves the override inert. add-hook prepends, and three hooks already run ahead. The old tests set org-category by hand to a value org never produces, so they passed while the feature did nothing. They now visit real files and assert on what the agenda reads. The two todo.org agenda files show their project name. Files with distinctive names keep theirs, and an explicit category still wins.
* feat(org-agenda): use project name as todo.org categoryCraig Jennings2026-05-131-0/+137
The %c column on agenda blocks rendered every project's todo.org as "todo:" -- org defaults the buffer category to the filename without extension, so every entry looked alike. An org-mode-hook now overrides org-category with the parent directory's basename (stripping a single leading dot, so ~/.emacs.d/todo.org reads as "emacs.d") whenever a todo.org file opens and its category is still the filename default. Explicit #+CATEGORY: keywords still win. 14 tests in test-org-agenda-config-category.el cover the helper's normal/boundary/error paths and the hook's override + explicit-category-preserved cases.