aboutsummaryrefslogtreecommitdiff
path: root/claude-rules/emacs.md
Commit message (Collapse)AuthorAgeFilesLines
* feat(inbox-zero): guard roam-inbox writes against live org-captureCraig Jennings4 days1-0/+6
| | | | | | | | | | Editing the roam inbox on disk while Emacs has an indirect org-capture buffer cloned from it reverts the base buffer under the capture: the capture can't finalize with C-c C-c, and a freshly-typed item can be lost. inbox-zero Phase D edits that file, which Craig captures into constantly, so the collision recurs every session. I added a capture-guard helper that asks the running daemon whether any CAPTURE buffer's base buffer visits a given file (file-equal-p, so symlinks and path spelling don't matter), exiting non-zero with the names when so. No reachable Emacs or no capture means exit 0, so it never blocks a write that was safe. Phase D calls it before the pull, not only before the remove, because the ff-only pull also rewrites the file on disk and would wedge a capture the same way. On a collision an on-demand run stops and asks Craig to finalize or abort. The wrap-up sub-step skips the roam reconcile without blocking the wrap, since the items are already filed and the next run reclaims them. emacs.md gains the inverse of the reload rule: don't yank a file out from under the daemon's live buffers.
* docs(emacs): note auth-source two-hour credential cacheCraig Jennings2026-06-021-0/+1
| | | | A freshly-added authinfo.gpg entry still reads as missing in the running daemon until auth-source's result cache expires. It caches both positive and negative lookups for auth-source-cache-expiry (default 7200s), so a key you just synced in keeps erroring as "not set" with no sign the file is fine. Clear it with (auth-source-forget-all-cached) and re-trigger the lookup. I hit this diagnosing a Linear/pearl API-key error after the key landed via a dotfiles sync.
* docs(rules): add live-reload guidance for the running Emacs daemonCraig Jennings2026-05-221-0/+28
Adds claude-rules/emacs.md documenting how to push a module edit into the long-running emacs daemon via emacsclient instead of restarting and re-opening files. Covers the reliable case (function redefinition), the caveats that bite (defvar defaults don't re-apply, use-package :config re-runs, faces need re-applying, baked or rendered state like the dashboard buffer must be regenerated), and the reload-and-verify loop. Captured after a long dashboard session where a stale buffer repeatedly masked working code.