<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-calendar-sync--deferred-start.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-06-29T23:46:28+00:00</updated>
<entry>
<title>refactor(calendar-sync): defer auto-start until first agenda use</title>
<updated>2026-06-29T23:46:28+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-06-29T23:46:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=549fcca10fbbdfa52b6061bac6b33683ccfb53fe'/>
<id>urn:sha1:549fcca10fbbdfa52b6061bac6b33683ccfb53fe</id>
<content type='text'>
calendar-sync ran calendar-sync-start at load, which syncs immediately and then every interval. Every configured calendar resolves its .ics feed URL from a :secret-host in authinfo.gpg, so both the immediate sync and each timer tick decrypt authinfo.gpg. On a cold gpg-agent (after a reboot) that surfaced as a GPG passphrase prompt right after startup, before I'd asked for anything needing a secret.

I deferred the whole start, immediate sync and recurring timer alike, to the first org-agenda use via a one-shot org-agenda-mode-hook. The unlock now happens when I actually open the agenda. A manual calendar-sync-start or calendar-sync-now still works on demand.
</content>
</entry>
</feed>
