summaryrefslogtreecommitdiff
path: root/todo.org
diff options
context:
space:
mode:
Diffstat (limited to 'todo.org')
-rw-r--r--todo.org905
1 files changed, 755 insertions, 150 deletions
diff --git a/todo.org b/todo.org
index 43021c6e..f7794956 100644
--- a/todo.org
+++ b/todo.org
@@ -17,7 +17,398 @@ If the answer is "no" to all five → DON'T ADD IT.
V2MOM is located at: [[file:docs/emacs-config-v2mom.org][emacs-config-v2mom.org]]
Research/ideas that don't serve vision: [[file:docs/someday-maybe.org][someday-maybe.org]]
-* Method 1: Make Using Emacs Frictionless [11/20]
+* Method 1: Make Using Emacs Frictionless [12/23]
+
+** TODO [#A] Fix recording workflow
+
+** TODO [#B] Consider implementing cron download of Google Calendar to replace org-gcal
+
+Replace problematic org-gcal OAuth workflow with simpler cron-based calendar download.
+This could eliminate the password prompt issues and provide a more reliable sync solution.
+
+**Current Problem:**
+From TODO at line 22-66:
+- org-gcal prompts for password every ~15 minutes
+- OAuth token refresh bypasses cache
+- plstore symmetric encryption cache issues
+- Interrupts workflow constantly
+- Makes calendar sync painful instead of seamless
+
+**Proposed Solution:**
+Instead of OAuth-based sync (org-gcal), use Google Calendar's public iCalendar URLs:
+1. Download .ics file via cron (every 15-30 minutes)
+2. Parse .ics file into org-mode format
+3. Update org-agenda files automatically
+4. No OAuth, no passwords, no interruptions
+
+**Benefits:**
+- ✓ No password prompts (public calendar URL or one-time API key)
+- ✓ No OAuth token refresh issues
+- ✓ Runs in background (cron), never interrupts work
+- ✓ Simpler architecture (download → parse → update)
+- ✓ Can work offline (reads last downloaded .ics)
+- ✓ More reliable (fewer moving parts)
+- ✓ No plstore symmetric encryption issues
+
+**Drawbacks:**
+- ✗ Read-only (can't create/update events from Emacs)
+- ✗ Need to manually get calendar iCal URL
+- ✗ Requires cron setup (one-time configuration)
+- ✗ May have sync delay (up to cron interval)
+
+**Investigation:**
+
+1. **Get Google Calendar iCal URL:**
+ - Open Google Calendar settings
+ - Find "Integrate calendar" section
+ - Copy secret iCal address (https://calendar.google.com/calendar/ical/...)
+ - Store in auth-source (encrypted)
+
+2. **Test iCal download:**
+ ```bash
+ curl -o calendar.ics "https://calendar.google.com/calendar/ical/.../basic.ics"
+ ```
+ - Verify it downloads
+ - Check .ics format
+ - Confirm events are present
+
+3. **Research iCal parsing:**
+ - Does Emacs have built-in iCal parser? (icalendar.el)
+ - Check icalendar-import-file function
+ - Test parsing downloaded .ics file
+ - Verify it creates org entries
+
+4. **Design cron workflow:**
+ ```bash
+ # Every 15 minutes
+ */15 * * * * curl -s "$(cat ~/.calendar-url)" -o ~/calendars/gcal.ics
+ ```
+ - Downloads silently in background
+ - Emacs watches file for changes (file-notify)
+ - Auto-reimport when changed
+
+**Possible Implementations:**
+
+A. **Full replacement (recommended):**
+ - Remove org-gcal entirely
+ - Use cron + icalendar.el
+ - Read-only calendar view in org-agenda
+ - Create events directly in Google Calendar web UI
+
+B. **Hybrid approach:**
+ - Keep org-gcal for writing events
+ - Use cron download for reading events
+ - Disable org-gcal auto-sync (no password prompts)
+ - Manually trigger org-gcal only when creating events
+
+C. **Enhanced cron:**
+ - Cron downloads .ics
+ - Emacs function parses and updates org files
+ - Add file-notify watcher for auto-update
+ - Optional: Convert two-way with CalDAV later
+
+**Implementation Sketch:**
+```elisp
+(defun cj/calendar-import-gcal ()
+ "Import Google Calendar from downloaded .ics file."
+ (interactive)
+ (let ((ics-file "~/calendars/gcal.ics")
+ (org-file "~/org/calendar.org"))
+ (when (file-exists-p ics-file)
+ (icalendar-import-file ics-file org-file)
+ (message "Imported calendar from %s" ics-file))))
+
+;; Auto-import when .ics file changes
+(file-notify-add-watch
+ "~/calendars/gcal.ics"
+ '(change)
+ (lambda (event) (cj/calendar-import-gcal)))
+```
+
+**Related Files:**
+- modules/org-gcal-config.el (current problematic implementation)
+- Emacs built-in: icalendar.el (iCal parsing)
+- System: crontab -e (download schedule)
+- ~/.authinfo.gpg (store calendar URL securely)
+
+**Related Docs:**
+- Current problem: TODO line 22-66 (password prompts every 15 min)
+- icalendar.el manual: C-h f icalendar-import-file
+- Google Calendar iCal format documentation
+- V2MOM Method 1: Frictionless (no interruptions!)
+
+**Success Criteria:**
+- Calendar events appear in org-agenda
+- No password prompts during work
+- Updates automatically in background (cron)
+- Can work offline with last sync
+- Setup is one-time configuration
+- Simpler than current org-gcal setup
+
+**Testing Plan:**
+1. Get iCal URL from Google Calendar
+2. Test download: `curl URL -o test.ics`
+3. Test import: `M-x icalendar-import-file`
+4. Verify org entries created correctly
+5. Set up cron job
+6. Wait for auto-update
+7. Confirm events in org-agenda
+8. Disable org-gcal auto-sync
+9. Monitor for 1 week (no password prompts?)
+
+**Decision Point:**
+This is a significant architectural change. Need to:
+1. Test proof-of-concept first (manual download + import)
+2. Evaluate if read-only is acceptable
+3. Compare to fixing OAuth password prompts
+4. Consider hybrid approach if two-way sync needed
+
+**Note:**
+Priority [#B] because this could eliminate the #1 daily irritant (password prompts
+every 15 minutes). If proof-of-concept works, this is higher value than fixing
+OAuth issues. Simpler architecture = fewer problems.
+
+** TODO [#B] Fix org-noter (reading/annotation workflow currently "so painful")
+
+High priority - daily pain point.
+
+** TODO [#B] Fix mail attachment workflow (currently awkward)
+
+Daily workflow improvement.
+
+** TODO [#B] Toggle org-appear on/off
+
+When org links have long paths and point is on them, they expand and make text difficult to read
+(especially in org-tables). Need ability to toggle org-appear: on for editing links, off for reading.
+Moved from inbox 2025-11-07.
+
+** TODO [#B] Optimize org-agenda performance using built-in profiler
+
+THE BOTTLENECK. Currently 30+ seconds, target < 5 seconds.
+Use M-x profiler-start before Method 3 debug-profiling.el is built.
+
+** TODO [#B] Optimize org-capture target building performance
+
+15-20 seconds every time capturing a task (12+ times/day).
+Major daily bottleneck - minutes lost waiting, plus context switching cost.
+
+** TODO [#B] Add time-zones package for quick timezone lookups
+
+IRRITANT: Need to frequently check time differences between cities (London, Lisbon,
+New Orleans, San Francisco) for meetings and coordination. Currently requires stopping
+work, searching web/using external app, context switching back.
+
+**Pain Point:**
+Multiple times per week, need to know "what time is it in London right now?" or
+"if I schedule this for 2pm my time, what time is that in Lisbon?" This breaks
+flow and requires leaving Emacs.
+
+**Solution:**
+Use time-zones package: https://github.com/xenodium/time-zones
+
+Built-in world-clock exists (M-x world-clock) but lacks two critical features:
+1. Can't interactively add cities with fuzzy search
+2. Can't shift time forward/backward to check future times
+
+time-zones package adds both features - making timezone checks instant and frictionless.
+
+**Expected Workflow:**
+- M-x time-zones (or keybinding C-; T z or similar)
+- Interactively add/remove cities with completion
+- Shift time forward/backward to check meeting times
+- Stay in Emacs, maintain flow
+
+**Files:**
+- Create new module: modules/time-zones-config.el
+- Add require to init.el in appropriate section
+- Configure default cities list (London, Lisbon, New Orleans, San Francisco)
+- Add keybinding (suggest C-; T z for time zones)
+
+**V2MOM Alignment:**
+Method 1 - Frictionless: Eliminates context switch for common timezone queries.
+Intuitive value: Quick keybinding for frequent operation.
+
+** TODO [#C] Verify format-buffer hands off to shfmt in shell scripts
+
+Need to verify that the format-buffer command correctly delegates to shfmt when
+formatting shell scripts. May not be configured or may use wrong formatter.
+
+**Problem:**
+- Unknown if format-buffer works in shell-script-mode
+- May not be using shfmt (should use shfmt for shell scripts)
+- May be using a different formatter (or no formatter)
+- Need to verify configuration and test manually
+
+**Investigation:**
+1. Find format-buffer implementation:
+ - Search for defun format-buffer in modules/
+ - Check if it's in prog-general.el or separate module
+ - Review how it selects formatters per mode
+2. Check shfmt configuration:
+ - Is shfmt installed? `which shfmt`
+ - Is shfmt configured for shell-script-mode?
+ - What are the shfmt command-line arguments?
+3. Test manually:
+ - Create test shell script with bad formatting
+ - Run format-buffer command
+ - Verify it uses shfmt (not something else)
+ - Check formatted output is correct
+
+**Expected Behavior:**
+1. In shell-script-mode buffer
+2. Run format-buffer (or whatever the command is)
+3. Should invoke shfmt to format the buffer
+4. Output should be properly formatted shell code
+5. Should preserve shebang and script functionality
+
+**Possible Issues:**
+
+A. **shfmt not installed**
+ - Check: `pacman -Q shfmt` or `which shfmt`
+ - Install if missing: `sudo pacman -S shfmt`
+
+B. **format-buffer not configured for shell**
+ - May only work for elisp/python/etc.
+ - Need to add shell-script-mode configuration
+ - Need to specify shfmt command
+
+C. **Wrong formatter used**
+ - May be using bashfmt, beautysh, or other tool
+ - Should specifically use shfmt (preferred)
+
+D. **format-buffer doesn't exist**
+ - May be using different command name
+ - Check for format-all, apheleia, or custom function
+
+**Manual Test:**
+Create test file:
+```bash
+#!/bin/bash
+# Poorly formatted script
+if [ -f "test.txt" ];then
+echo "found"
+else
+ echo "not found"
+fi
+for i in 1 2 3;do echo $i;done
+```
+
+Expected after shfmt:
+```bash
+#!/bin/bash
+# Poorly formatted script
+if [ -f "test.txt" ]; then
+ echo "found"
+else
+ echo "not found"
+fi
+for i in 1 2 3; do
+ echo $i
+done
+```
+
+**Related Commands to Check:**
+- format-buffer
+- format-all-buffer
+- apheleia-format-buffer
+- Custom cj/format-buffer
+
+**Related Files:**
+- modules/prog-general.el (likely location of format-buffer)
+- modules/prog-shell.el (shell-specific config)
+- Check for apheleia or format-all package config
+
+**Related Docs:**
+- shfmt documentation: https://github.com/mvdan/sh
+- format-all or apheleia package docs (whichever is used)
+- V2MOM Method 1: Frictionless (formatting should just work)
+
+**Success Criteria:**
+- format-buffer (or equivalent) command exists
+- Works in shell-script-mode buffers
+- Uses shfmt as the formatter
+- Produces correctly formatted shell code
+- Doesn't break script functionality
+- Documented what command to use and how it works
+
+**If It Doesn't Work:**
+1. Install shfmt: `sudo pacman -S shfmt`
+2. Configure formatter (apheleia or format-all):
+ ```elisp
+ ;; Example configuration
+ (add-to-list 'apheleia-formatters
+ '(shfmt . ("shfmt" "-i" "2" "-ci")))
+ (add-to-list 'apheleia-mode-alist
+ '(shell-script-mode . shfmt))
+ ```
+3. Test again
+4. Document in prog-shell.el
+
+**Note:**
+Priority [#C] because formatting is nice-to-have. Can format manually with shfmt
+if needed. Low priority but good for maintaining code quality in shell scripts.
+
+Normal case: File with #!/bin/bash at start should get +x permission."
+ (let ((test-file (make-temp-file "test-script-" nil ".sh")))
+ (unwind-protect
+ (progn
+ ;; Write shebang to file
+ (with-temp-file test-file
+ (insert "#!/bin/bash\necho hello\n"))
+ ;; Remove execute permission
+ (set-file-modes test-file #o644)
+ (should-not (file-executable-p test-file))
+ ;; Open file and trigger function
+ (with-current-buffer (find-file-noselect test-file)
+ (cj/make-script-executable)
+ (kill-buffer))
+ ;; Verify file is now executable
+ (should (file-executable-p test-file)))
+ (delete-file test-file))))
+```
+
+**Related Files:**
+- modules/prog-shell.el:158-167 (function to test)
+- tests/test-prog-shell-make-script-executable.el (NEW - create this)
+- ai-prompts/quality-engineer.org (testing guidance)
+
+**Related Docs:**
+- quality-engineer.org: File system testing best practices
+- Recent test examples: test-custom-buffer-file-*.el (file operations)
+- Emacs manual: File permissions and file-modes function
+
+**Success Criteria:**
+- Comprehensive test file covering all normal/boundary/error cases
+- All tests pass on Linux
+- Tests properly clean up temp files
+- Tests verify actual file permission changes
+- Tests verify message output
+- No false positives (making non-script files executable)
+- No false negatives (missing files that should be executable)
+- Tests document expected behavior (serve as specification)
+
+**Estimated Tests:**
+- 6-8 normal cases (different shebangs)
+- 8-10 boundary cases (edge conditions)
+- 5-6 error cases (failure handling)
+- Total: ~20-25 tests
+
+**Note:**
+Priority [#B] because this function runs on every save in shell-script-mode and
+modifying file permissions incorrectly could cause security issues or workflow
+problems. Needs testing before any refactoring or changes.
+
+** TODO [#D] Frequently used org-mode keybindings under C-; o
+
+Add quick access keybindings for common org commands (org-table, org-reveal, etc.) under C-; o.
+Makes org-mode operations more frictionless.
+Moved from inbox 2025-11-07.
+
+** TODO [#D] Fix EMMS keybinding inconsistency with other buffers
+
+EMMS keybindings conflict with standard buffer keybindings, causing mistypes.
+Results in accidental destructive actions (clearing buffers), requires undo + context switch.
+Violates Intuitive value - muscle memory should help, not hurt.
** DONE [#A] Fix Google Calendar password prompts every 15 minutes
CLOSED: [2025-11-11 Mon]
@@ -80,29 +471,7 @@ After restart:
Priority [#A] because password prompts every 15 minutes violated "Frictionless" value.
Fixed 2025-11-11.
-** TODO [#B] Fix org-noter (reading/annotation workflow currently "so painful")
-
-High priority - daily pain point.
-** TODO [#B] Fix mail attachment workflow (currently awkward)
-
-Daily workflow improvement.
-
-** TODO [#B] Toggle org-appear on/off
-
-When org links have long paths and point is on them, they expand and make text difficult to read
-(especially in org-tables). Need ability to toggle org-appear: on for editing links, off for reading.
-Moved from inbox 2025-11-07.
-
-** TODO [#B] Optimize org-agenda performance using built-in profiler
-
-THE BOTTLENECK. Currently 30+ seconds, target < 5 seconds.
-Use M-x profiler-start before Method 3 debug-profiling.el is built.
-
-** TODO [#B] Optimize org-capture target building performance
-
-15-20 seconds every time capturing a task (12+ times/day).
-Major daily bottleneck - minutes lost waiting, plus context switching cost.
** DONE [#A] Fix audio recording device selection - still broken with Jabra headset
CLOSED: [2025-11-11 Mon]
@@ -171,54 +540,6 @@ After Emacs restart:
Priority [#A] because blocked daily recording and transcription workflows.
Fixed 2025-11-11.
-** TODO [#B] Add time-zones package for quick timezone lookups
-
-IRRITANT: Need to frequently check time differences between cities (London, Lisbon,
-New Orleans, San Francisco) for meetings and coordination. Currently requires stopping
-work, searching web/using external app, context switching back.
-
-**Pain Point:**
-Multiple times per week, need to know "what time is it in London right now?" or
-"if I schedule this for 2pm my time, what time is that in Lisbon?" This breaks
-flow and requires leaving Emacs.
-
-**Solution:**
-Use time-zones package: https://github.com/xenodium/time-zones
-
-Built-in world-clock exists (M-x world-clock) but lacks two critical features:
-1. Can't interactively add cities with fuzzy search
-2. Can't shift time forward/backward to check future times
-
-time-zones package adds both features - making timezone checks instant and frictionless.
-
-**Expected Workflow:**
-- M-x time-zones (or keybinding C-; T z or similar)
-- Interactively add/remove cities with completion
-- Shift time forward/backward to check meeting times
-- Stay in Emacs, maintain flow
-
-**Files:**
-- Create new module: modules/time-zones-config.el
-- Add require to init.el in appropriate section
-- Configure default cities list (London, Lisbon, New Orleans, San Francisco)
-- Add keybinding (suggest C-; T z for time zones)
-
-**V2MOM Alignment:**
-Method 1 - Frictionless: Eliminates context switch for common timezone queries.
-Intuitive value: Quick keybinding for frequent operation.
-
-** TODO [#D] Frequently used org-mode keybindings under C-; o
-
-Add quick access keybindings for common org commands (org-table, org-reveal, etc.) under C-; o.
-Makes org-mode operations more frictionless.
-Moved from inbox 2025-11-07.
-
-** TODO [#D] Fix EMMS keybinding inconsistency with other buffers
-
-EMMS keybindings conflict with standard buffer keybindings, causing mistypes.
-Results in accidental destructive actions (clearing buffers), requires undo + context switch.
-Violates Intuitive value - muscle memory should help, not hurt.
-
** DONE [#A] Remove network check from startup (saves 1+ seconds)
CLOSED: [2025-10-31 Fri]
@@ -444,53 +765,173 @@ CLOSED: [2025-11-08 Fri]
File modified: modules/flyspell-and-abbrev.el:235-251
-** TODO [#A] Fix recording workflow
+* Method 2: Stop Problems Before They Appear [3/8]
+
-* Method 2: Stop Problems Before They Appear [3/6]
** TODO [#A] Write Complete ERT Tests for This Config [0/0]
Unit and Integration Tests should be added as subtasks below, marked done when complete
-** TODO [#B] Migrate from Company to Corfu
-:PROPERTIES:
-:COMPLETE_CONFIG: [[file:docs/someday-maybe.org::1611][todo.org:1611-1639]]
-:END:
+** TODO [#B] Move cj/log-silently to system-lib
+
+The `cj/log-silently` function is a generic utility for logging messages without
+displaying them in the echo area. It should be moved to system-lib.el for better
+organization and reusability across modules.
+
+**Current Problem:**
+- cj/log-silently is likely defined in a specific module
+- It's a generic logging utility that could be used by any module
+- Not easily discoverable for reuse
+- Doesn't follow the system-lib pattern we're establishing
+
+**What is cj/log-silently?**
+This function logs messages to the *Messages* buffer without interrupting the user
+by displaying them in the echo area (minibuffer). Useful for debugging and tracing
+code execution without breaking user flow.
+
+**Task:**
+1. **Find current location:**
+ ```bash
+ grep -rn "defun cj/log-silently" modules/
+ ```
+
+2. **Review implementation:**
+ - Check if it has dependencies on mode-specific functionality
+ - Verify it's truly generic (should be)
+ - Check for any callers that need updating
+
+3. **Move to system-lib.el:**
+ - Cut from current location
+ - Paste into system-lib.el
+ - Add appropriate commentary/docstring
+ - Ensure proper section organization
+
+4. **Update callers:**
+ - Find all uses: `grep -rn "cj/log-silently" modules/`
+ - Add `(require 'system-lib)` to any module that uses it
+ - Verify no circular dependencies
+
+5. **Write tests:**
+ Create `tests/test-system-lib-log-silently.el` with coverage for:
+ - Normal cases: logging simple messages
+ - Boundary cases: empty strings, very long messages, special characters
+ - Error cases: nil input, non-string input
+ - Verify output: check *Messages* buffer contains logged text
+ - Verify silence: ensure nothing appears in echo area
+
+**Expected Signature:**
+```elisp
+(defun cj/log-silently (format-string &rest args)
+ "Log a message to *Messages* buffer without displaying in echo area.
+FORMAT-STRING and ARGS work like `message' but output is not shown to user."
+ (let ((inhibit-message t))
+ (apply #'message format-string args)))
+```
-Complete config already exists in someday-maybe.org. Just needs to be executed.
+**Related Files:**
+- modules/system-lib.el (destination)
+- Current module where cj/log-silently lives (TBD - find it)
+- All modules that call cj/log-silently (update requires)
+- tests/test-system-lib-log-silently.el (NEW - create this)
-** TODO [#C] Integrate prescient with Corfu (smart sorting)
+**Related Docs:**
+- System-lib refactoring initiative (previous TODO)
+- quality-engineer.org (testing guidance)
+- Recent refactoring: moved cj/executable-exists-p to system-lib
+- V2MOM Method 2: Stop Problems Before They Appear (better organization)
-Already using prescient with vertico. Extend to Corfu after migration.
+**Success Criteria:**
+- cj/log-silently moved to system-lib.el
+- All callers updated with proper requires
+- Comprehensive test coverage (normal/boundary/error cases)
+- All existing tests still pass (no regressions)
+- Function works identically to before
+- Well-documented in system-lib.el
-** TODO [#B] Consolidate dirvish file opening methods - choose working implementation
+**Testing:**
+1. Run all tests before move (baseline)
+2. Move function and update requires
+3. Run all tests after move (verify no breakage)
+4. Run new cj/log-silently tests (verify behavior)
+5. Test in real usage (logging works, messages not shown)
-Multiple duplicate methods exist for opening files externally from dirvish. Unclear which
-actually works. This makes config feel poorly crafted and causes confusion when trying to
-open files with system default applications.
+**Note:**
+Priority [#B] because this is part of the larger system-lib consolidation effort
+(separate TODO). Logging utilities are commonly used, so centralizing them improves
+discoverability and encourages consistent logging patterns across the codebase.
-**Problem:**
-- Hitting issues when trying to open files from dirvish
-- Multiple duplicate implementations scattered across config
-- Don't know which method to use
-- Need ONE canonical working method that:
- - Opens with system default app (xdg-open on Linux)
- - Detaches from Emacs (doesn't block, survives Emacs closing)
- - Works reliably for dirvish keybindings
+** TODO [#B] Review all config and pull library functions into system-lib file
-**Investigation:**
-1. Find all duplicate methods (grep for xdg-open, open-externally, system-open)
-2. Test each method - which actually works?
-3. Choose the working one, delete duplicates
-4. Wire up dirvish to use the working method
-5. Document in dirvish-config.el
+Extract reusable utility functions scattered across modules into system-lib.el
+for better code organization and reusability.
+
+**Goal:**
+Create a centralized system utilities library where generic functions that check
+system state, detect programs, or provide low-level system operations can live.
+This makes them:
+- Easily discoverable
+- Reusable across modules
+- Testable in isolation
+- Following single-responsibility principle
+
+**Current State:**
+- system-lib.el exists with `cj/executable-exists-p` function
+- Already required at top of init.el (System Configuration section)
+- Has comprehensive test coverage (test-system-lib-executable-exists-p.el)
+
+**Task:**
+1. Search entire config for candidate functions:
+ - System queries (program detection, path checking, environment vars)
+ - File system utilities (beyond buffer-file operations)
+ - Process utilities
+ - Platform detection helpers
+2. Review each module for extraction candidates:
+ - host-environment.el (already has some, may have more)
+ - system-utils.el (may contain generic utilities)
+ - Any module with functions that don't depend on mode-specific context
+3. Move appropriate functions to system-lib.el:
+ - Update function documentation
+ - Add require statements where functions are used
+ - Maintain backward compatibility (old locations can call new ones)
+4. Add comprehensive test coverage for all moved functions
+5. Document the purpose/scope of system-lib.el in its Commentary section
+
+**Criteria for inclusion in system-lib.el:**
+- ✓ Pure utility functions (no side effects)
+- ✓ System-level queries (executable detection, path operations)
+- ✓ Platform-agnostic where possible
+- ✓ No dependencies on mode-specific functionality
+- ✗ NOT buffer/file operations (those stay in custom-buffer-file.el)
+- ✗ NOT user-facing commands (those stay in their domain modules)
+
+**Related Files:**
+- modules/system-lib.el (target file)
+- modules/host-environment.el (likely source)
+- modules/system-utils.el (likely source)
+- modules/config-utilities.el (check for candidates)
+- tests/test-system-lib-*.el (add tests for moved functions)
+
+**Related Docs:**
+- Recent refactoring: Created system-lib.el with cj/executable-exists-p
+- Testing guidance: ai-prompts/quality-engineer.org
+- V2MOM Method 2: Stop Problems Before They Appear (better organization)
**Success Criteria:**
-- ONE method for external file opening
-- Dirvish can open files with system apps
-- Duplicates removed
-- Clear which function to use
+- All generic system utilities consolidated in system-lib.el
+- Each function has comprehensive test coverage
+- No functionality broken (all tests pass)
+- Documentation explains purpose and scope of system-lib.el
+- Other modules properly require system-lib where needed
-Priority [#B] because active workflow confusion and feels like poor craftsmanship.
-Moved from inbox 2025-11-11.
+** TODO [#B] Migrate from Company to Corfu
+:PROPERTIES:
+:COMPLETE_CONFIG: [[file:docs/someday-maybe.org::1611][todo.org:1611-1639]]
+:END:
+
+Complete config already exists in someday-maybe.org. Just needs to be executed.
+
+** TODO [#C] Integrate prescient with Corfu (smart sorting)
+
+Already using prescient with vertico. Extend to Corfu after migration.
** DONE [#C] Switch to mood-line (actually: built custom modeline)
CLOSED: [2025-11-03 Sun]
@@ -543,55 +984,13 @@ CLOSED: [2025-11-03 Sun]
- Updated comment on line 71 to reference org-appear
- Cleaner editing experience while maintaining visual clarity
-* Method 3: Make *Fixing* Emacs Frictionless [1/6]
+* Method 3: Make *Fixing* Emacs Frictionless [0/9]
** TODO [#B] Build debug-profiling.el module
Reusable profiling infrastructure for any future performance work.
-** TODO [#B] Evaluate Buttercup for
-** TODO [#C] Build localrepo out (package snapshot system)
-
-Repeatable installs and safe rollbacks.
-
-*** TODO [#C] Document localrepo limitations (treesitter grammars not included)
-
-.localrepo only contains packages from package.el archives.
-Treesitter grammars are downloaded separately by treesit-auto on first use.
-For true offline reproducibility, need to cache treesitter grammars separately.
-
-** TODO [#C] Integrate Buttercup (behavior-driven integration tests)
-
-Complex workflow testing capability.
-
-** TODO [#D] Optimize lorem-optimum performance for faster text generation
-
-Lorem-optimum text generation is generally slow but doesn't completely break workflow.
-Two benchmark tests were disabled (marked :slow) because they take MINUTES instead of seconds.
-
-**Current State:**
-- Tests disabled to unblock test suite (DONE 2025-11-09)
-- Performance is acceptable for daily use, but could be better
-- liber-primus.txt may be too large for optimal performance
-
-**Investigation:**
-1. Profile lorem-optimum to find bottlenecks
-2. Check if liber-primus.txt size needs optimization
-3. Optimize performance to get tests under 5 seconds
-4. Re-enable benchmark tests once performance is acceptable
-
-**Related Files:**
-- modules/lorem-optimum.el (needs profiling and optimization)
-- tests/test-lorem-optimum-benchmark.el (tests disabled with :tags '(:slow))
-- liber-primus.txt (corpus file, may need size optimization)
-
-**Success Criteria:**
-- Text generation completes in reasonable time
-- Benchmark tests run in < 5 seconds
-- Tests can be re-enabled without blocking test suite
-
-Priority [#D] because it's not breaking workflow, just slower than ideal.
-
-** TODO [#B] Write tests for cj/make-script-executable (suspected broken)
+** TODO [#B] Evaluate Buttercup for integration tests
+** TODO [#A] Write tests for cj/make-script-executable (suspected broken)
The `cj/make-script-executable` function automatically makes shell scripts executable
when they have a shebang, but has no test coverage. **Suspected to be broken/not working.**
@@ -632,7 +1031,7 @@ Following quality-engineer.org patterns:
Priority [#B] because if broken, it's a daily workflow issue (scripts don't auto-execute).
Moved from inbox 2025-11-11.
-** TODO [#B] Fix difftastic integration - not showing semantic diffs (just unified diff)
+** TODO [#A] Fix difftastic integration - not showing semantic diffs (just unified diff)
Difftastic was marked as "integrated" but diffs in magit and custom-buffer-file.el look
identical to standard unified diffs. **Likely not actually using difftastic** - probably
@@ -773,3 +1172,209 @@ Proposed:
Priority [#B] because it improves readability and maintainability. Not urgent,
but makes the codebase cleaner and more portable.
+** TODO [#C] Build localrepo out (package snapshot system)
+
+Repeatable installs and safe rollbacks.
+
+*** TODO [#C] Document localrepo limitations (treesitter grammars not included)
+
+.localrepo only contains packages from package.el archives.
+Treesitter grammars are downloaded separately by treesit-auto on first use.
+For true offline reproducibility, need to cache treesitter grammars separately.
+
+** TODO [#C] Integrate Buttercup (behavior-driven integration tests)
+
+Complex workflow testing capability.
+
+** TODO [#D] Optimize lorem-optimum performance for faster text generation
+
+Lorem-optimum text generation is generally slow but doesn't completely break workflow.
+Two benchmark tests were disabled (marked :slow) because they take MINUTES instead of seconds.
+
+**Current State:**
+- Tests disabled to unblock test suite (DONE 2025-11-09)
+- Performance is acceptable for daily use, but could be better
+- liber-primus.txt may be too large for optimal performance
+
+**Investigation:**
+1. Profile lorem-optimum to find bottlenecks
+2. Check if liber-primus.txt size needs optimization
+3. Optimize performance to get tests under 5 seconds
+4. Re-enable benchmark tests once performance is acceptable
+
+**Related Files:**
+- modules/lorem-optimum.el (needs profiling and optimization)
+- tests/test-lorem-optimum-benchmark.el (tests disabled with :tags '(:slow))
+- liber-primus.txt (corpus file, may need size optimization)
+
+**Success Criteria:**
+- Text generation completes in reasonable time
+- Benchmark tests run in < 5 seconds
+- Tests can be re-enabled without blocking test suite
+
+Priority [#D] because it's not breaking workflow, just slower than ideal.
+
+
+*** TODO [#D] Optimize size of liber-primus.txt for lorem-optimum and investigate launch notices
+
+The liber-primus.txt file may be too large for optimal lorem-optimum performance,
+causing slow random text generation or excessive memory usage. Additionally, there
+are notices appearing in the *Messages* buffer during Emacs launch that need investigation.
+
+**Primary Problem:**
+- liber-primus.txt might be too large for efficient text generation
+- lorem-optimum may be slow when selecting random text from large corpus
+- File size could be causing memory or performance issues
+- Impact on startup time or buffer creation unknown
+
+**Secondary Problem:**
+- *Messages* buffer shows notices during Emacs launch
+- May be related to lorem-optimum, liber-primus, or unrelated issues
+- Need to identify source and severity of notices
+
+**Investigation:**
+
+1. **Check current file size:**
+ ```bash
+ ls -lh liber-primus.txt
+ wc -l liber-primus.txt
+ wc -w liber-primus.txt
+ ```
+
+2. **Review lorem-optimum configuration:**
+ - Find lorem-optimum module: `grep -r "lorem-optimum" modules/`
+ - Check how liber-primus.txt is loaded
+ - Look for performance issues in implementation
+ - Check if entire file is loaded into memory
+
+3. **Test performance with current file:**
+ ```elisp
+ (benchmark-run 100
+ (lorem-ipsum-insert-paragraphs 1))
+ ```
+ - Measure baseline performance
+ - Note memory usage
+
+4. **Investigate Messages buffer notices:**
+ - Launch Emacs with `emacs --debug-init`
+ - Check *Messages* buffer immediately after startup
+ - Search for lorem, liber-primus, or warning keywords
+ - Note timestamps and context
+
+5. **Identify notices source:**
+ - Could be from lorem-optimum loading
+ - Could be file permissions warnings
+ - Could be encoding issues
+ - Could be unrelated initialization messages
+
+**Possible Solutions:**
+
+1. **Reduce file size** (if too large):
+ - Keep most meaningful/interesting sections
+ - Remove repetitive content
+ - Target size: 50-100KB (fast loading, sufficient variety)
+ - Preserve character of cryptic/cipher text
+
+2. **Optimize lorem-optimum loading** (if implementation issue):
+ - Lazy load: don't read file until first use
+ - Sample lines: don't load entire file
+ - Cache in memory: read once, reuse
+ - Stream reading: read chunks as needed
+
+3. **Fix launch notices** (if errors/warnings):
+ - Fix source of warnings
+ - Silence benign notices
+ - Add proper error handling
+ - Document expected behavior
+
+**Testing:**
+1. Note baseline: file size, performance, messages
+2. Apply optimization (file size or code)
+3. Measure improvement:
+ - File size reduced?
+ - Performance improved?
+ - Messages cleaned up?
+4. Verify text generation still works
+5. Check variety/quality of generated text
+
+**Related Files:**
+- liber-primus.txt (the text corpus file)
+- modules/lorem-optimum.el or similar (lorem generation module)
+- init.el (loading sequence, Messages source)
+- tests/test-lorem-optimum-*.el (performance/benchmark tests)
+
+**Related Docs:**
+- DONE task at line 68-96: "Review lorem-optimum benchmark tests and fix"
+- Failed benchmark tests may be related to this issue
+- V2MOM Method 1: Frictionless (fast text generation)
+- V2MOM Method 2: Stop Problems Before They Appear (clean Messages)
+
+**Success Criteria:**
+- liber-primus.txt optimized to reasonable size (<100KB ideal)
+- lorem-optimum generates text quickly (<100ms for paragraph)
+- No unnecessary notices in *Messages* during launch
+- Text generation still produces varied, interesting output
+- Benchmark tests pass (after fixing per separate TODO)
+- Documented optimal file size and loading strategy
+
+**Benchmark Target:**
+- Text generation: <100ms for 1 paragraph
+- File loading: <50ms at startup (if not lazy loaded)
+- Memory usage: Reasonable for file size
+- No degradation from current working state
+
+**Note:**
+Priority [#B] because performance impacts daily workflow (lorem text generation
+used frequently for testing) and clean *Messages* buffer is important for catching
+real issues during startup. This ties into fixing the 2 failed benchmark tests
+(separate TODO at line 68-96).
+
+* Method 4: Contribute to the Emacs Ecosystem [0/4]
+
+** TODO [#B] Integrate undercover.el for test coverage
+
+Measure and track test coverage over time.
+
+** TODO [#B] Set up melpazoid CI for MELPA submissions
+
+Validates packages meet MELPA standards.
+
+** TODO [#C] Set up package-lint for elisp linting (chime, org-msg, wttrin)
+
+Catch packaging issues automatically.
+
+** TODO [#C] Set up elisp-check GitHub Action
+
+Zero-config CI for Emacs packages.
+
+* Method 5: Be Kind To Your Future Self [1/2]
+
+** DONE [#C] Add transcription workflow
+CLOSED: [2025-11-12 Wed 02:41]
+:PROPERTIES:
+:COMPLETE_CONFIG: [[file:docs/someday-maybe.org::2][todo.org:2-99]]
+:END:
+
+Complete code already exists in someday-maybe.org. Need today and recurring.
+
+** TODO [#B] Implement org-reveal presentation workflow
+
+Create reveal.js slides from org-mode.
+
+* Method 6: Develop Disciplined Engineering Practices [1/3]
+** TODO [#B] Track current metrics baseline
+
+- [ ] Measure current startup time (time emacs --eval '(save-buffers-kill-emacs)')
+- [ ] Count current active todos
+- [ ] Set up tracking document for weekly metrics
+
+** TODO [#C] Set up monthly research:shipped ratio tracking
+
+Can't research next thing until current thing is implemented.
+
+** DONE [#A] First weekly triage by Sunday (establish habit)
+CLOSED: [2025-11-12 Wed 02:41] SCHEDULED: <2025-11-03 Sun>
+
+Review this inbox, cancel stale items, keep < 20 active. Track in calendar.
+
+* Emacs Config Inbox