<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs.git/modules/org-gcal-config.el, branch v0.7.2</title>
<subtitle>my Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs.git/atom?h=v0.7.2</id>
<link rel='self' href='https://git.cjennings.net/dotemacs.git/atom?h=v0.7.2'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs.git/'/>
<updated>2025-11-17T00:09:17+00:00</updated>
<entry>
<title>feat(calendar-sync): Add automatic timezone detection and chronological sorting</title>
<updated>2025-11-17T00:09:17+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-17T00:09:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs.git/commit/?id=da0bd6883a4032054aef4b59c338f60796a0fd99'/>
<id>urn:sha1:da0bd6883a4032054aef4b59c338f60796a0fd99</id>
<content type='text'>
Implemented calendar-sync.el as a complete replacement for org-gcal, featuring:

**Core Functionality:**
- One-way sync from Google Calendar to Org (via .ics URL)
- UTC to local timezone conversion for all event timestamps
- Chronological event sorting (past → present → future)
- Non-blocking sync using curl (works reliably in daemon mode)

**Automatic Timezone Detection:**
- Detects timezone changes when traveling between timezones
- Tracks timezone offset in seconds (-21600 for CST, -28800 for PST, etc.)
- Triggers automatic re-sync when timezone changes detected
- Shows informative messages: "Timezone change detected (UTC-6 → UTC-8)"

**State Persistence:**
- Saves sync state to ~/.emacs.d/data/calendar-sync-state.el
- Persists timezone and last sync time across Emacs sessions
- Enables detection even after closing Emacs before traveling

**User Features:**
- Interactive commands: calendar-sync-now, calendar-sync-start/stop
- Keybindings: C-; g s (sync), C-; g a (start auto-sync), C-; g x (stop)
- Optional auto-sync every 15 minutes (disabled by default)
- Clear status messages for all operations

**Code Quality:**
- Comprehensive test coverage: 51 ERT tests (100% passing)
- Refactored UTC conversion into separate function
- Clean separation of concerns (parsing, conversion, formatting, sorting)
- Well-documented with timezone behavior guide and changelog

**Migration:**
- Removed org-gcal-config.el (archived in modules/archived/)
- Updated init.el to use calendar-sync
- Moved gcal.org to .emacs.d/data/ for machine-independent syncing
- Removed org-gcal appointment capture template

Files modified: modules/calendar-sync.el:442, tests/test-calendar-sync.el:577
Files created: data/calendar-sync-state.el, tests/testutil-calendar-sync.el
Documentation: docs/calendar-sync-timezones.md, docs/calendar-sync-changelog.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</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.git/commit/?id=8176eff73b826f7fec9d7f458f7d2f36f4d12e58'/>
<id>urn:sha1:8176eff73b826f7fec9d7f458f7d2f36f4d12e58</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.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix: Resolve Google Calendar password prompts every 10 minutes</title>
<updated>2025-11-05T06:53:52+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-05T06:53:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs.git/commit/?id=76b7a15d7eaeaff81874d922d5ce2b0090eb7c98'/>
<id>urn:sha1:76b7a15d7eaeaff81874d922d5ce2b0090eb7c98</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: Add complete async audio transcription workflow</title>
<updated>2025-11-04T20:35:50+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-04T20:35:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs.git/commit/?id=45cab5c38dc089935416a89d36b461d9127094ac'/>
<id>urn:sha1:45cab5c38dc089935416a89d36b461d9127094ac</id>
<content type='text'>
Implemented full transcription system with local Whisper and OpenAI API
support. Includes comprehensive test suite (60 tests) and reorganized
keybindings for better discoverability.

Features:
- Async transcription (non-blocking workflow)
- Desktop notifications (started/complete/error)
- Output: audio.txt (transcript) + audio.log (process logs)
- Modeline integration showing active transcription count
- Dired integration (press T on audio files)
- Process management and tracking

Scripts:
- install-whisper.sh: Install Whisper via AUR or pip
- uninstall-whisper.sh: Clean removal with cache cleanup
- local-whisper: Offline transcription using installed Whisper
- oai-transcribe: Cloud transcription via OpenAI API

Tests (60 passing):
- Audio file detection (16 tests)
- Path generation logic (11 tests)
- Log cleanup behavior (5 tests)
- Duration formatting (9 tests)
- Active counter &amp; modeline (11 tests)
- Integration workflows (8 tests)

Keybindings:
- Reorganized gcal to C-; g submenu (s/t/r/c)
- Added C-; t transcription submenu (t/b/k)
- Dired: T to transcribe file at point

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix: Change org-gcal to use Google Calendar as authoritative source</title>
<updated>2025-11-02T03:45:34+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-02T03:45:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs.git/commit/?id=99bf4bafb4aeb33372cdf02536df70097f6bbe67'/>
<id>urn:sha1:99bf4bafb4aeb33372cdf02536df70097f6bbe67</id>
<content type='text'>
Changed from bidirectional "org" mode to "gcal" mode to avoid sync conflicts.
This prevents HTTP 412 errors on recurring events and HTTP 400 errors on
modified events.

Google Calendar is now authoritative:
- org-gcal-managed-newly-fetched-mode: "gcal" (was "org")
- org-gcal-managed-update-existing-mode: "gcal" (was "org")

Benefits:
- No more version conflicts on recurring events
- Cleaner sync without errors
- Google Calendar changes always win

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: Add org-gcal dependencies and org-contacts birthday automation</title>
<updated>2025-11-02T03:37:38+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-02T03:37:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs.git/commit/?id=07111be17f9af24a82617745bf3f72a9c98d5eac'/>
<id>urn:sha1:07111be17f9af24a82617745bf3f72a9c98d5eac</id>
<content type='text'>
org-gcal-config.el:
- Add use-package declarations for deferred and oauth2-auto
- Ensures dependencies are automatically installed on fresh systems
- Fixes "Cannot open load file" errors when syncing

org-contacts-config.el:
- Add automatic birthday timestamp insertion via capture template
- Parse YYYY-MM-DD or MM-DD birthday formats
- Insert yearly repeating timestamps after properties drawer
- Add NICKNAME and NOTE fields to capture template

org-agenda-config.el:
- Enable chime-debug mode for troubleshooting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat:org-gcal: Auto-save files after sync completion</title>
<updated>2025-10-29T14:00:57+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-29T14:00:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs.git/commit/?id=980e21b9f0861c30ff4b371edf48c7f8bc1f1944'/>
<id>urn:sha1:980e21b9f0861c30ff4b371edf48c7f8bc1f1944</id>
<content type='text'>
Add a function to automatically save all org-gcal files after
synchronization completes. This ensures that any changes are
persisted, enhancing data consistency. Advise
`org-gcal--sync-unlock` to trigger auto-saving upon sync completion.
</content>
</entry>
<entry>
<title>maint:vc install org-msg, disable debugging on org-gcal</title>
<updated>2025-10-28T02:24:51+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-28T02:24:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs.git/commit/?id=076d8c26e463fef339997a3e19df42d1879f5a81'/>
<id>urn:sha1:076d8c26e463fef339997a3e19df42d1879f5a81</id>
<content type='text'>
</content>
</entry>
<entry>
<title>maint:org-gcal: Add forward declarations and update org-gcal usage</title>
<updated>2025-10-28T01:39:09+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-28T01:39:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs.git/commit/?id=8953d671b5ce15c96cb9b992a9783148f7867bcc'/>
<id>urn:sha1:8953d671b5ce15c96cb9b992a9783148f7867bcc</id>
<content type='text'>
Forward declare internal org-gcal variables and functions to improve
code clarity. Update use-package declaration with version control
information to use my fork of org-gcal (fixes, better testing).
</content>
</entry>
<entry>
<title>feat:which-key: Add descriptive labels for custom keymaps</title>
<updated>2025-10-27T23:45:23+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-27T23:45:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs.git/commit/?id=87034eab17625165b884128d8058c1158fc2f50f'/>
<id>urn:sha1:87034eab17625165b884128d8058c1158fc2f50f</id>
<content type='text'>
Enhance which-key integration by providing detailed descriptions for
new key bindings across multiple modules. This improves the
usability of custom keymaps by clarifying the purpose of each
keybinding, making it easier for users to navigate and understand
different menus and options available within the configuration.

This update ensures that all custom keymaps now display a
descriptive label in the which-key popup to explain their
functionality, aiding users in identifying keymap purposes promptly.
</content>
</entry>
</feed>
