aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-02 13:50:38 -0500
committerCraig Jennings <c@cjennings.net>2026-06-02 13:50:38 -0500
commit066faed99b2aaa221e18f3138b7ebd76a733c62c (patch)
tree29bec289fabee54f2d38cd7e4762ed4bf8ea35bd
parent1952ed41ca07b8bf4bca3b68b0f94a786ce2345a (diff)
downloadrulesets-066faed99b2aaa221e18f3138b7ebd76a733c62c.tar.gz
rulesets-066faed99b2aaa221e18f3138b7ebd76a733c62c.zip
docs(emacs): note auth-source two-hour credential cache
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.
-rw-r--r--claude-rules/emacs.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/claude-rules/emacs.md b/claude-rules/emacs.md
index 2e99637..702b40e 100644
--- a/claude-rules/emacs.md
+++ b/claude-rules/emacs.md
@@ -18,6 +18,7 @@ This re-evaluates the file and redefines its `defun`s live. For straight functio
- **`use-package` `:config` / `:init` re-run on a full file `load`.** That re-adds hooks, re-binds keys, re-runs setup — functionally fine, but it stacks state and isn't pristine. For an edit inside a `:config` block, prefer eval-ing just the changed form, or accept the restacking, or restart for a clean state.
- **Faces and themes need re-applying.** Editing a theme/face file does nothing until the theme is re-applied: `(load-theme 'THEME t)`.
- **Baked or rendered state must be regenerated.** Values computed at load time (e.g. a list built from `nerd-icons-*` calls) and already-drawn buffers (e.g. `*dashboard*`) do not update from a var reload alone — regenerate them (e.g. `dashboard-refresh-buffer`). This is the stale-buffer trap: the variable looks correct but the visible buffer is old. It once made a screenshot look right when the live buffer was still wrong.
+- **`auth-source` caches credentials for two hours.** Editing `authinfo.gpg` (or syncing in a fresh copy) does not take effect in the running daemon until `(auth-source-forget-all-cached)`. The result cache holds both positive and negative lookups for `auth-source-cache-expiry` (default 7200s), so a key you just added still reads as "not set" until the cache clears or Emacs restarts. Symptom: a freshly-added credential keeps erroring as missing even though the entry is in the file. Fix: `emacsclient -e '(auth-source-forget-all-cached)'`, then re-trigger the lookup. (2026-06-01, diagnosing a Linear/pearl "API key not set" after the key landed in authinfo via a dotfiles sync.)
## The reload-and-verify loop (default for visible Emacs changes)