summaryrefslogtreecommitdiff
path: root/modules/ui-config.el
AgeCommit message (Collapse)Author
2025-11-08feat: Fix modeline lag and add org multi-level sort with comprehensive testsCraig Jennings
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>
2025-11-03feat: Complete modeline overhaul with custom segments and interactive featuresCraig Jennings
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 (< 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. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20refactor: ui-config: replace defcustom with defvar for consistencyCraig Jennings
- Change `defcustom` to `defvar` for transparency variables. - Improve error handling in `cj/set-frame-alpha`. - Optimize cursor color update with efficient hooks. - Defer `nerd-icons` loading for better startup performance.
2025-10-12changing repositoriesCraig Jennings