| Age | Commit message (Collapse) | Author |
|
Fixed oauth2-auto.el caching bug using Emacs advice system (survives updates).
Root Cause:
- oauth2-auto version 20250624.1919 has `or nil` on line 206
- This completely disables the internal hash-table cache
- Every org-gcal sync requires decrypting oauth2-auto.plist from disk
- GPG passphrase prompted every ~15 minutes (violated "Frictionless" value)
The Fix (via advice):
- Created cj/oauth2-auto--plstore-read-fixed with cache enabled
- Applied as :override advice to oauth2-auto--plstore-read
- Survives package updates (unlike direct modification)
- Can be easily removed if upstream fixes the bug
Changes:
- modules/auth-config.el:
* Added cj/oauth2-auto--plstore-read-fixed (lines 75-93)
* Applied advice on package load (lines 96-98)
* Added cj/clear-oauth2-auto-cache helper
* Documented fix in commentary (lines 16-22)
- todo.org: Mark #A priority task as DONE
- docs/oauth2-auto-cache-fix.md: Detailed documentation
Result:
- Passphrase prompted ONCE per Emacs session (on cold start)
- Subsequent org-gcal syncs use cached tokens (no prompts)
- Workflow now frictionless as intended
- Fix persists across package updates
Upstream:
- Bug acknowledged in code: "Assume cache is invalidated. FIXME"
- Should report to: https://github.com/rhaps0dy/emacs-oauth2-auto
- Simple fix: Remove `or nil` on line 206
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
Performance improvement and new feature with full test coverage.
## Changes
### 1. Fix modeline line/column position lag (#A priority)
- Replace expensive line-number-at-pos with cached %l/%c format specifiers
- Enable line-number-mode explicitly for caching
- Result: Instant modeline updates, zero performance overhead
- Files: modules/modeline-config.el:81-83, modules/ui-config.el:53
### 2. Implement multi-level org sorting
- New function: cj/org-sort-by-todo-and-priority
- Sorts by TODO status (TODO before DONE) AND priority (A→B→C→D)
- Uses stable sorting: priority first, then TODO state
- Gracefully handles empty sections (no error)
- Bound to C-; o o (ordering → org sort)
- Files: modules/org-config.el:278-299, modules/custom-ordering.el:253,267
### 3. Comprehensive ERT test suite (12/12 passing)
- Normal cases: Mixed TODO/DONE, multiple of same type, same priority
- Boundary cases: Empty sections, single entries, no priorities
- Error cases: Non-org-mode buffer
- Test file: tests/test-org-sort-by-todo-and-priority.el
### 4. Testing improvements discovered
- Disable org-mode hooks to avoid package dependencies in batch mode
- org-sort-entries must be called from parent heading
- Preserve priority cookie in org-get-heading (t t nil t)
- Add condition-case to handle "Nothing to sort" gracefully
### 5. Minor cleanup
- Comment out chime-debug setting (org-agenda-config.el:267)
- Mark modeline lag task as DONE in todo.org
## Technical Details
Modeline optimization:
- line-number-at-pos is O(n) where n = current line
- %l and %c are O(1) lookups from cached values
Org sorting algorithm uses stable sort:
1. Sort by priority (A, B, C, D, unprioritized)
2. Sort by TODO status (preserves priority order within groups)
Result: TODO [#A], TODO [#B], DONE [#A], DONE [#B], etc.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
Added cj/reset-auth-cache function to recover from incorrect password
entry for encrypted files like authinfo.gpg. Resolves "Bad session key"
and "Decryption failed" errors.
Key features:
- Smart cache clearing: preserves 400-day GPG/SSH cache by default
- Optional prefix arg (C-u) to also clear gpg-agent cache
- Clears auth-source, EPA file handler, and optionally gpg-agent caches
- Bound to C-; A for easy access (removed from debug menu C-c d)
Also added cj/kill-gpg-agent for aggressive agent reset when needed.
Consolidates and replaces simpler auth-source-only version that was
previously in config-utilities.el.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
Problem: oauth2-auto.plist passphrase requested every ~10 minutes during
gcal-sync auto-sync, interrupting workflow despite 400-day gpg-agent cache.
Root cause: auth-config.el was setting GPG_AGENT_INFO to nil, telling
Emacs to ignore gpg-agent entirely. Additionally, plstore caching was
loading too late in org-gcal-config.
Solution:
- Disabled GPG_AGENT_INFO override to allow gpg-agent usage
- Added auth-source-cache-expiry (24-hour cache for credentials)
- Moved plstore configuration from org-gcal-config to auth-config
- Enabled plstore-cache-passphrase-for-symmetric-encryption globally
- Set plstore-encrypt-to nil for symmetric encryption
Files modified:
- modules/auth-config.el: Added plstore config, removed agent bypass
- modules/org-gcal-config.el: Removed duplicate plstore config
- docs/NOTES.org: Session notes documenting fix
Testing: Restart Emacs and verify no password prompts for 30+ minutes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
|
|
Switch from require to eval-when-compile for loading user-constants
to ensure the authinfo-file location is defined at compile-time.
|
|
|