<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/todo.org, branch lkg</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=lkg</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=lkg'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2025-11-11T23:39:43+00:00</updated>
<entry>
<title>fix: Resolve Google Calendar password prompts via advice</title>
<updated>2025-11-11T23:39:43+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-11T23:35:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=90dcf621cffdd752db02444511cb4b94adc72b50'/>
<id>urn:sha1:90dcf621cffdd752db02444511cb4b94adc72b50</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>updating tasks</title>
<updated>2025-11-09T21:36:32+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-09T21:36:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=5a00d6bf978fd06bd6aac055441d5ab9e9cc54fb'/>
<id>urn:sha1:5a00d6bf978fd06bd6aac055441d5ab9e9cc54fb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: Fix modeline lag and add org multi-level sort with comprehensive tests</title>
<updated>2025-11-08T22:11:58+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-08T22:11:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=513dfd2a1d497da8bd9d5261458cf4140dce7ad6'/>
<id>urn:sha1:513dfd2a1d497da8bd9d5261458cf4140dce7ad6</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>fix: Resolve flyspell keybinding and mu4e sent folder sync issues</title>
<updated>2025-11-08T19:35:42+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-08T19:35:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=7ae3d37e3caeedb74fbc30b8bef1681f4807e434'/>
<id>urn:sha1:7ae3d37e3caeedb74fbc30b8bef1681f4807e434</id>
<content type='text'>
Two Method 1 quick wins shipped:

1. Fixed cj/flyspell-then-abbrev keybinding in org-mode
   - Autoload cookies were comments and never executed
   - Added explicit keybinding setup when module loads
   - Override org-mode's C-' binding (org-cycle-agenda-files)
   - Both C-' and C-c f now work in all buffers

2. Fixed mu4e sent folder not syncing (cmail account)
   - Root cause: mbsync aborted on Drafts errors before Sent
   - Changed ~/.mbsyncrc to explicit channels (like Gmail)
   - Synced 136 missing sent messages (May-Nov 7)
   - Now syncs 6 folders independently

Files modified:
- modules/flyspell-and-abbrev.el: Fixed keybindings (lines 235-251)
- todo.org: Marked 2 tasks complete with documentation
</content>
</entry>
<entry>
<title>chore: Disable automatic syncs and triage inbox</title>
<updated>2025-11-08T05:18:38+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-08T05:18:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=b9c81aba5a941f0598cc31a51102440a30a3dd6d'/>
<id>urn:sha1:b9c81aba5a941f0598cc31a51102440a30a3dd6d</id>
<content type='text'>
- Commented out mu4e-update-interval to stop email password prompts
- Triaged 5 inbox items against V2MOM framework
- Moved 4 items to Method 1 (frictionless improvements)
- Split org keymaps task into Method 1 + someday-maybe components
- Deleted unclear 'toggle org-agenda' task
- Clarified org-appear toggle requirement for long links in tables
- Updated Method 1 count from [8/14] to [8/18]
- Added transient menu task to SOMEDAY-MAYBE
- Cleared inbox for new items
</content>
</entry>
<entry>
<title>chore: Update abbrev corrections and add flyspell TODO</title>
<updated>2025-11-06T23:58:59+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-06T23:58:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=2b2f4706d69b9aa04ff99f7e5cfe8f086226ca0b'/>
<id>urn:sha1:2b2f4706d69b9aa04ff99f7e5cfe8f086226ca0b</id>
<content type='text'>
- Automatic abbrev_defs updates from spell corrections
- Added TODO: investigate flyspell-then-abbrev keybinding loss in scratch
</content>
</entry>
<entry>
<title>feat: Add high-priority task for Google Calendar password prompts</title>
<updated>2025-11-06T07:02:43+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-06T07:02:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=acbc6834696637949484bed685d54571013137ca'/>
<id>urn:sha1:acbc6834696637949484bed685d54571013137ca</id>
<content type='text'>
Added comprehensive TODO to Method 1 (priority A) to fix the irritating
issue where gcal-sync triggers password prompts every 15 minutes,
interrupting workflow and breaking concentration.

Task includes:
- Current setup documentation (GPG agent, plstore, auth-source config)
- Problem analysis (plstore cache, oauth2-auto token refresh)
- Six investigation paths to try
- File references for debugging
- V2MOM alignment (violates "Frictionless" value)

This is a daily irritant that needs fixing - password prompts every 15
minutes during calendar sync defeat the purpose of having 400-day GPG
cache configured.

Related files:
- modules/auth-config.el (plstore and GPG configuration)
- modules/org-gcal-config.el (org-gcal and oauth2-auto setup)
- ~/.gnupg/gpg-agent.conf (GPG agent cache settings)
</content>
</entry>
<entry>
<title>feat: Add AssemblyAI transcription backend with speaker diarization</title>
<updated>2025-11-06T06:43:13+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-06T06:43:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=7110f8c1f41b9c82288efb328c709dd00ed8fcb6'/>
<id>urn:sha1:7110f8c1f41b9c82288efb328c709dd00ed8fcb6</id>
<content type='text'>
Integrated AssemblyAI as the third transcription backend alongside OpenAI
API and local-whisper, now set as the default due to superior speaker
diarization capabilities (up to 50 speakers).

New Features:
- AssemblyAI backend with automatic speaker labeling
- Backend switching UI via C-; T b (completing-read interface)
- Universal speech model supporting 99 languages
- API key management through auth-source/authinfo.gpg

Implementation:
- Created scripts/assemblyai-transcribe (upload → poll → format workflow)
- Updated transcription-config.el with multi-backend support
- Added cj/--get-assemblyai-api-key for secure credential retrieval
- Refactored process environment handling from if to pcase
- Added cj/transcription-switch-backend interactive command

Testing:
- Created test-transcription-config--transcription-script-path.el
- 5 unit tests covering all 3 backends (100% passing)
- Followed quality-engineer.org guidelines (test pure functions only)
- Investigated 18 test failures: documented cleanup in todo.org

Files Modified:
- modules/transcription-config.el - Multi-backend support and UI
- scripts/assemblyai-transcribe - NEW: AssemblyAI integration script
- tests/test-transcription-config--transcription-script-path.el - NEW
- todo.org - Added test cleanup task (Method 3, priority C)
- docs/NOTES.org - Comprehensive session notes added

Successfully tested with 33KB and 4.1MB audio files (3s and 9s processing).
</content>
</entry>
<entry>
<title>feat: Configure scratch buffer for org-mode with cursor at end</title>
<updated>2025-11-05T07:00:38+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-05T07:00:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=f6b6717ee39a9480a139f2e47a34f006fee07c60'/>
<id>urn:sha1:f6b6717ee39a9480a139f2e47a34f006fee07c60</id>
<content type='text'>
- Set initial-major-mode to org-mode for *scratch* buffer
- Add emacs-startup-hook to position cursor at end of buffer
- Update greeting message comment syntax from ;; to # for org-mode
- Re-enable debug flag reset on startup in early-init.el

This makes the scratch buffer immediately ready for org-mode note-taking
with cursor positioned for typing, eliminating manual mode switching and
cursor movement.
</content>
</entry>
<entry>
<title>feat: Add LanguageTool integration for comprehensive grammar checking</title>
<updated>2025-11-05T05:26:42+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-05T05:26:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=118b586691d199b57cc15089089fd545109b6e86'/>
<id>urn:sha1:118b586691d199b57cc15089089fd545109b6e86</id>
<content type='text'>
Integrated LanguageTool as an on-demand grammar checker, replacing the
previously disabled proselint checker.

Changes:
- Created scripts/languagetool-flycheck wrapper for flycheck integration
  - Converts LanguageTool JSON output to flycheck format
  - Includes suggestions in error messages
  - 30-second timeout for large files

- Updated modules/flycheck-config.el:
  - Defined languagetool checker for text/markdown/org/gfm modes
  - Updated cj/flycheck-prose-on-demand to use LanguageTool
  - Added installation instructions (sudo pacman -S languagetool)
  - Improved documentation clarity

- Usage: Press C-; ? in org/text/markdown files
  - Enables flycheck with LanguageTool
  - Shows errors in *Flycheck errors* buffer
  - On-demand only (no performance impact)

- Updated docs/NOTES.org:
  - Added best practice: Test Emacs launch after non-trivial changes
  - Example: emacs --eval "(kill-emacs)"
  - Catches startup errors before committing

- Disabled weather debug mode (wttrin-debug nil)

- Marked todo.org grammar checker task as DONE

LanguageTool catches real grammar issues (subject-verb agreement, tense,
punctuation, common mistakes) that proselint missed.

Installation: LanguageTool 6.6 (222MB) from Arch repos
Dependencies: Python 3 (for wrapper script)
</content>
</entry>
</feed>
