<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-org-contacts-config-anniversaries.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-05-22T00:42:05+00:00</updated>
<entry>
<title>fix(org-contacts): set org-contacts-files eagerly so launch doesn't error</title>
<updated>2026-05-22T00:42:05+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-22T00:42:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=099a771275607db3a362e4239c69e7ab58f3ad7c'/>
<id>urn:sha1:099a771275607db3a362e4239c69e7ab58f3ad7c</id>
<content type='text'>
At startup the agenda-finalize hook ran cj/org-contacts-anniversaries-safe, which calls org-contacts-anniversaries, which calls org-contacts-files. That function messages "[org-contacts] ERROR: Your custom variable `org-contacts-files' is nil." when the variable is nil, and at that point it was nil. The value was set via the use-package :custom, which only applies when org-contacts loads, and that load is deferred behind :after (org mu4e) — later than the first agenda finalize.

I set org-contacts-files eagerly at require time instead, so it's never nil by the time the hook fires. I also guarded the wrapper: org-contacts-files emits a message rather than signaling, so ignore-errors couldn't suppress it on its own. Now the call only runs when the variable is set.

Three tests cover the eager set, the guard skipping when files are nil, and the wrapper running when they're set. Full suite green.
</content>
</entry>
</feed>
