<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-org-agenda-config-category.el, branch main</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-07-30T14:09:15+00:00</updated>
<entry>
<title>fix(agenda): make the project-name category actually apply</title>
<updated>2026-07-30T14:09:15+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-30T14:09:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=ce223dc63c4901603e66aab0ebc8934791260c89'/>
<id>urn:sha1:ce223dc63c4901603e66aab0ebc8934791260c89</id>
<content type='text'>
- 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.
</content>
</entry>
<entry>
<title>feat(org-agenda): use project name as todo.org category</title>
<updated>2026-05-13T20:25:52+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-13T20:25:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=acff943af4b0d598151db249e82ce2b1666b3d85'/>
<id>urn:sha1:acff943af4b0d598151db249e82ce2b1666b3d85</id>
<content type='text'>
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.
</content>
</entry>
</feed>
