|
New test coverage (86 tests across 7 files):
- custom-case: 43 tests (title-case-region, upcase-dwim, downcase-dwim)
- custom-datetime: 10 tests (all insert methods with mocked time)
- config-utilities: 11 tests (format-build-time type branching)
- org-capture-config: 22 tests (date-prefix + event-content)
Production bugs found and fixed:
- custom-case: title-case-region crashes on whitespace/punctuation-only input
(char-after returns nil when no word chars found)
- org-capture-config: browser branch missing empty-string guard on :initial
plist value, producing stray newline in capture output
- mousetrap-mode: keymap never registered in minor-mode-map-alist, so mode
was silently not blocking any mouse events. Now pushes/removes on toggle.
Additional fixes:
- local-repository: fix cons cell syntax bug in localrepo-initialize
(was calling vars as functions instead of using cons)
- dupre-theme tests: update rainbow-delimiter color expectations
- mousetrap tests: update dashboard profile (primary-click → scroll+primary)
- music completion test: bind completion-ignore-case to prevent pollution
- Delete redundant interactive recording test (duplicate of ERT version)
Refactoring:
- org-capture-config: extract cj/org-capture--date-prefix pure function
from cj/org-capture-format-event-headline for testability
Test checklist: todo.org updated to [11/25], removed untestable modules
|
|
Implement comprehensive profile-based system for selective mouse event
control with dynamic lighter and interactive toggling.
Features:
- Profile-based architecture (7 profiles: disabled, scroll-only,
primary-click, scroll+primary, read-only, interactive, full)
- Mode-specific configuration (dashboard, pdf-view, nov)
- Dynamic keymap building based on current major mode
- Clickable modeline lighter (🐭 when off, 🪤 when on)
- Dynamic reconfiguration without Emacs reload
- Mode inheritance support via derived-mode-p
Profiles define which event categories are allowed:
- primary-click: Left mouse button only
- secondary-click: Middle and right buttons
- drags: Drag selections
- multi-clicks: Double and triple clicks
- scroll: Mouse wheel/trackpad scrolling
Default configuration:
- dashboard-mode: primary-click (left-click only)
- pdf-view-mode: full (all events)
- nov-mode: full (all events)
- Other modes: disabled (all events blocked)
Tests:
- 66 comprehensive tests across 5 test files
- Unit tests for profile lookup and keymap building
- Integration tests for mode switching and dynamic config
- Lighter functionality and click interaction tests
- All tests passing
Known issue:
- Dashboard-mode clicks blocked despite primary-click profile
- Documented in todo.org for investigation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|