<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/modules/modeline-config.el, branch performance</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=performance</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=performance'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2025-11-11T23:43:34+00:00</updated>
<entry>
<title>a/v recording: fix setup, add test functionality and indicator</title>
<updated>2025-11-11T23:43:34+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-11T23:43:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=3750a4e683d19aa424223618b1d67a2d963461bf'/>
<id>urn:sha1:3750a4e683d19aa424223618b1d67a2d963461bf</id>
<content type='text'>
Integrates a modeline indicator to display active recording status
in Emacs. The indicator shows "🔴Audio", "🔴Video", or "🔴A+V" based
on the active recording processes. Includes functions for starting
and stopping audio/video recordings, with sentinel processes
ensuring timely updates to the modeline. Also adds extensive
integration tests to validate modeline synchronization.
</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 async buffer error and improve modeline spacing</title>
<updated>2025-11-04T23:23:50+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-04T23:23:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=ea8cf7cfed957b8a2b6f864faa2b2f4f8be118e7'/>
<id>urn:sha1:ea8cf7cfed957b8a2b6f864faa2b2f4f8be118e7</id>
<content type='text'>
- Fixed critical "Selecting deleted buffer" error on startup
  - wttrin-mode-line-mode now activates after init completes
  - Uses after-init-hook to prevent async buffer deletion
  - Weather widget loads safely after Emacs finishes initializing

- Improved modeline right-side spacing
  - Added 2 non-breaking spaces after misc-info segment
  - Prevents weather icon from appearing flush with edge
  - Non-breaking spaces survive right-align trimming
</content>
</entry>
<entry>
<title>style: Fix checkdoc linting errors in modeline-config.el</title>
<updated>2025-11-04T04:09:34+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-04T04:09:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=ddb4ec57b261d5630f909ee16eacf9b17288fdc3'/>
<id>urn:sha1:ddb4ec57b261d5630f909ee16eacf9b17288fdc3</id>
<content type='text'>
Fixed 4 categories of checkdoc warnings:
- Removed embedded keycodes (mouse-1, mouse-3) from docstrings
- Added double spaces after periods
- Quoted Lisp symbols with backticks
- Changed single quotes to backticks in examples

All docstrings now follow Emacs documentation conventions.
Passes checkdoc and byte-compilation cleanly.
</content>
</entry>
<entry>
<title>feat: Complete modeline overhaul with custom segments and interactive features</title>
<updated>2025-11-04T00:01:24+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-04T00:01:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=97b03e6764539d586860382ca519060b386325e2'/>
<id>urn:sha1:97b03e6764539d586860382ca519060b386325e2</id>
<content type='text'>
Replaced mood-line with a custom, minimal modeline using only built-in
Emacs functionality to avoid native compilation issues.

**Architecture:**
- Named segment system using defvar-local for easy reordering
- Emacs 30 built-in right-alignment (mode-line-format-right-align)
- All segments marked as risky-local-variable for proper evaluation

**Features:**
- Color-coded buffer names (green=writeable, red=read-only, gold=overwrite)
- VC branch with git symbol (U+E0A0) and state-based coloring
- Position format: L:line C:col
- Help-echo tooltips on all segments
- Mouse click handlers for interactive actions
- String truncation in narrow windows (&lt; 100 chars)
- Active-window-only display for branch and misc-info

**Interactive Actions:**
- Buffer name: mouse-1 = prev-buffer, mouse-3 = next-buffer
- Major mode: mouse-1 = describe-mode
- Git branch: mouse-1 = vc-diff, mouse-3 = vc-root-diff

**Bug Fixes:**
- Disabled async native compilation to prevent "Selecting deleted buffer" errors
- Fixed difftastic loading by changing :demand to :defer
- Abstracted buffer status colors to user-constants.el for reuse

Inspired by Prot's modeline design patterns.
</content>
</entry>
<entry>
<title>refactor: Replace doom-modeline with mood-line and remove deprecated tree-sitter</title>
<updated>2025-11-03T21:43:36+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-03T21:43:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=05c8126602905d805ddc2a4448436c9c4adb12fc'/>
<id>urn:sha1:05c8126602905d805ddc2a4448436c9c4adb12fc</id>
<content type='text'>
Method 2 improvements for cleaner, faster configuration:

1. **Replaced doom-modeline with mood-line** (modules/modeline-config.el)
   - Simplified from 70+ lines to ~10 lines (-40 lines net)
   - mood-line is lightweight, minimal, inspired by doom-modeline
   - Better performance with no dependencies
   - Keeps all essential features: buffer status, major mode, VCS,
     flycheck, cursor position, multiple-cursors counters

2. **Removed deprecated tree-sitter package** (modules/prog-general.el)
   - Deleted `(use-package tree-sitter)`
   - Now relies solely on Emacs 29+ built-in treesit with treesit-auto
   - treesit-auto continues to manage grammars automatically
   - No functionality lost, cleaner dependency tree

Both changes serve Method 2: "Stop Problems Before They Appear"
- Simpler code = fewer bugs
- Fewer dependencies = less maintenance
- Native features = better integration

Updated todo.org to mark both tasks complete [2/5 in Method 2].
</content>
</entry>
<entry>
<title>docs: modeline: Update commentary for performance optimizations</title>
<updated>2025-10-20T18:28:27+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-20T18:28:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=c8434a013b2ab6433f980689152f72cbbe3d0a80'/>
<id>urn:sha1:c8434a013b2ab6433f980689152f72cbbe3d0a80</id>
<content type='text'>
Add detailed explanations regarding performance optimizations in
Doom modeline settings. This includes prioritizing speed by
disabling minor features and tuning performance with specific
settings such as refresh rate and process output size.
</content>
</entry>
<entry>
<title>changing repositories</title>
<updated>2025-10-12T16:47:26+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-12T16:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=092304d9e0ccc37cc0ddaa9b136457e56a1cac20'/>
<id>urn:sha1:092304d9e0ccc37cc0ddaa9b136457e56a1cac20</id>
<content type='text'>
</content>
</entry>
</feed>
