aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fix(ai-config): force tab-width=8 in gptel org-mode prompt buffersCraig Jennings2026-05-163-0/+143
| | | | | | | | gptel's `gptel--with-buffer-copy-internal` copies the source buffer's `major-mode` symbol but doesn't run mode hooks. An inherited-org-mode prompt buffer keeps `tab-width` at this config's global default of 4 instead of the 8 that `org-mode-hook` would set. When gptel later parses the prompt buffer with `org-element`, Org's `tab-width=8` guard raises "Tab width in Org files must be 8, not 4." I was hitting this on every second `gptel-magit-generate-message` from COMMIT_EDITMSG. `vc-config.el` sets `git-commit-major-mode 'org-mode'`, and the diffs contained list-shaped content that `org-element--list-struct` parsed. The advice forces `tab-width=8` in the prompt buffer when its inherited mode is org-mode. It's a local workaround for an upstream gap. An upstream patch to run `(delay-mode-hooks (funcall major-mode))` in the buffer-copy is the real fix. I'll send it next.
* docs(todo): Add org-element--list-struct gptel magit bugCraig Jennings2026-05-161-1/+13
|
* chore(todo): close transient-setup gptel-magit fixCraig Jennings2026-05-151-1/+2
|
* fix(ai-config): Ensure gptel-magit is installed via use-packageCraig Jennings2026-05-153-16/+38
| | | | | | | Replace raw autoload calls with a `use-package` declaration so `use-package-always-ensure` installs gptel-magit on machines that haven't run `package-install`, fixing the "Cannot open load file" error on transient setup.
* fix(flycheck): correct abbrev-mode no-arg toggle in cj/prose-helpers-onCraig Jennings2026-05-153-96/+610
| | | | | | | | | | | | | | | | | The shape (if (not (abbrev-mode)) (abbrev-mode)) calls abbrev-mode with no argument -- that's the toggle signature, not a query. When the mode was already on the function flipped it off then on instead of being a no-op. Replaced with (unless (bound-and-true-p VAR) (MODE 1)) for both abbrev-mode and flycheck-mode. 4 ERT tests cover both-off, both-on, and the two mixed states. Also ran the module hardening pass across 24 newly-added modules, renamed the six completed Review sub-tasks to Harden, filed 11 new findings under their Harden parents, and broke three design specs (EMMS-free music, dev F-keys, dev-setup-project) into 20 dependency-ordered sub-tasks via parallel subagents. Verified the sqlite finalizer bug from 2026-04-26 is gone and closed its tracking entry.
* test(recording): skip integration tests when screencast access failsCraig Jennings2026-05-151-0/+34
| | | | | | | | The three integration tests in test-video-audio-recording-process-cleanup spawn wf-recorder via cj/ffmpeg-record-video and assert on pgrep counts. They guard with executable-find and XDG_SESSION_TYPE checks, but neither catches the case where the subprocess can run wf-recorder yet lacks Wayland screencast permission. wf-recorder picks a region, retries "Failed to copy frame" 17 times, then exits with code 183 inside a second. The assertion fires against an empty pgrep. I added test-cleanup--can-capture-frames, which calls cj/ffmpeg-record-video against a temp dir, waits 1s, and checks pgrep. If wf-recorder didn't survive, the three integration tests skip. The result is cached, so the ~2.5s cost is paid once per batch. I added the same guard to test-integration-video-recording-multiple-start-stop-cycles. Its assertion is (= count initial-count), so it trivially passed in any environment where capture didn't work. Skipping is more honest than passing for the wrong reason.
* chore(todo): wrap-up archive + lint passCraig Jennings2026-05-151-81/+78
| | | | | | `--archive-done` moved two completed level-2 PROJECTs into Resolved: the `<cj` universal yasnippet conversion and the LSP file-watch ignored-directories task — both closed earlier this session. `lint-org` applied a small batch of mechanical heading-line merges. The remaining judgment items (broken file links + one invalid fuzzy link) went to the lint follow-ups file for later review. `--sync-child-priority` is a no-op now that the two top-level review PROJECTs carry `:no-sync:` and the inheritance fix lives upstream in claude-templates.
* chore(todo): close <cj universal yasnippet projectCraig Jennings2026-05-151-6/+7
| | | | | | | | | | | All four sub-tasks complete, parent advances to DONE + CLOSED: - Wired yasnippet for universal availability (yas-global-mode + the fundamental-mode extras hook). - Created the <cj snippet at snippets/fundamental-mode/. - Removed the org-tempo cj entry. - Audited existing per-mode snippets — all 28 are correctly mode-scoped, no movers. Sub-task headings landed as dated event-log entries per todo-format.md's depth-based completion rule. The parent stays task-shaped at level-2 for agenda visibility.
* refactor(org-babel): drop redundant cj structure templateCraig Jennings2026-05-151-3/+3
| | | | Now that yasnippet handles `<cj` + TAB in every buffer including org-mode, the `cj` entry in `org-structure-template-alist` is redundant. I removed it and left a one-line comment pointing to where the marker now lives.
* feat(snippets): add universal <cj marker snippetCraig Jennings2026-05-151-0/+7
| | | | | | | | | | | | New `snippets/fundamental-mode/cj-comment-block` expands `<cj` + TAB to the literal three-line marker block: #+begin_src cj: comment <cursor> #+end_src It lives in `fundamental-mode/` so yas's parent-chain lookup finds it in every buffer, plus the activation hook from the previous commit explicitly turns on `fundamental-mode` as an extra mode in every buffer — so even modes that don't descend from `fundamental-mode` (like `special-mode`-derived buffers) pick it up. The marker is what my Python scanner skill picks out across files. Now I can plant it in any buffer, not just org where the old org-tempo entry lived.
* feat(yas): activate yasnippet globally with fundamental-mode extrasCraig Jennings2026-05-152-3/+141
| | | | | | | | The yasnippet use-package block switches from `:hook (prog-mode . yas-minor-mode)` to `:demand t` + `(yas-global-mode 1)`. That makes yas-minor-mode active in every buffer, not just prog-mode-derived ones. I added a small helper, `cj/--yas-activate-fundamental-extras`, attached as `:hook (yas-minor-mode . ...)`. It calls `(yas-activate-extra-mode 'fundamental-mode)` so the snippet table at `snippets/fundamental-mode/` is consulted in every buffer regardless of the buffer's own major mode. That's what makes universal triggers like `<cj` work everywhere. The new `tests/test-prog-general-yas-activation.el` covers both wiring (yas-global-mode on, fundamental-mode in yas-extra-modes, yas-minor-mode active in org/text buffers) and end-to-end expansion (the marker snippet expands correctly in fundamental, text, org, emacs-lisp, and python-ts modes). 9 tests, all green; full unit suite green with no regressions.
* chore(todo): track conversion of <cj structure template to universal yasnippetCraig Jennings2026-05-151-0/+66
| | | | | | Today <cj only expands in org-mode via org-structure-template-alist. A Claude skill scans for the literal #+begin_src cj: comment marker across files, so I need to insert the exact same text in any buffer regardless of major mode. The new task captures four sub-tasks: wire yasnippet to yas-global-mode + activate fundamental-mode as an extra mode in every buffer, create the snippet at snippets/fundamental-mode/, remove the now-redundant org-tempo entry from modules/org-babel-config.el:144, and a smaller follow-up audit of existing per-mode snippets that should probably live in fundamental-mode/.
* chore(todo): expand Gptel Work project with concrete planCraig Jennings2026-05-151-16/+97
| | | | | | | | | | The Gptel Work heading was a one-line placeholder. I filled it in with nine sub-tasks after deciding to keep gptel for one-off conversations, impromptu help, and the rewrite-region helper (workflow distinct from the F9 ai-vterm agents, so per-project sessions stay uncluttered). Bumped the parent to PROJECT [#B] and merged the standalone "Investigate gptel-magit not working properly" task in as a sub-task — the gptel-magit work belongs with the rest of the gptel surface. Four [#B] work items: wire the existing update_text_file tool into cj/gptel-local-tool-features, fix the three gptel-magit triggers, add ERT coverage for ai-conversations.el (zero today), add ERT coverage for the gptel-tools .el files (also zero). Five [#C] proposals for review: research and shortlist additional gptel tools, promote gptel-rewrite ergonomics with a directive picker, build a saved-conversations browser, add a one-shot quick-ask command, and ship an autosave toggle + mode-line indicator.
* chore(todo): close LSP file-watch ignore-list taskCraig Jennings2026-05-151-38/+4
| | | | The implementation shipped 2026-04-26 in 781b46e (cj/lsp-file-watch-ignored-extras plus the hook in modules/prog-lsp.el, 10/10 tests green). The manual smoke check in the dashboard MVP and the redundant .dir-locals.el cleanup on velox are tracked separately as active reminders, so todo.org doesn't need to carry the VERIFY state.
* chore(todo): mark Consolidate shared utility helpers as doneCraig Jennings2026-05-151-135/+157
| | | | | | | | | | | All five children shipped earlier this month but were left tagged TODO/VERIFY. I verified each against the repo, marked them DONE with their actual closure dates, and closed the PROJECT today. Children closed: - Write full utility consolidation design spec — 2026-05-04 (b3ef232a) - Inventory private helpers across modules — 2026-05-10 (502bcf41) - Extract executable lookup with warning helper — cj/executable-find-or-warn in system-lib.el (c75e36f4) - Extract argv-based process runner helper — cj/process-output-or-error and cj/git-output-or-error in system-lib.el (57e558ce) - Extract Org-safe text sanitizers — cj-org-text-lib.el (0f9e3087)
* chore(todo): archive completed work, lint, and rebalance review-project priorityCraig Jennings2026-05-151-575/+568
| | | | | | | | I ran the wrap-up hygiene that the previous session skipped. `--archive-done` moved 7 DONE subtrees out of Open Work into Resolved. `lint-org` applied 8 mechanical heading-line merges. 12 remaining judgment items (mostly broken file links and one malformed timestamp) went to the lint follow-ups file for later. I tagged the two top-level review projects `:no-sync:` so their subtrees stop cascading priority bumps — `:refactor:no-sync:` on the architecture review project and `:review:no-sync:` on the module-by-module review project. The latter also dropped from `[#A]` to `[#B]`. It was sitting at A only because the cascade was forcing it. B is where the work belongs now that the opt-out works.
* chore(todo): re-review module-by-module pass — 32 new findings + newly ↵Craig Jennings2026-05-151-0/+371
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added modules Second-pass review of the existing six review tracks (foundation, custom editing, UI / navigation, Org workflow, programming workflow, integrations) walked each track as if it had not been reviewed before. Existing child tasks were deliberately excluded from re-reporting; only concrete, file-cited, actionable findings not already on the parent project's task list were filed. Findings filed: - Foundation (5): duplicate user-home-dir constant; redundant eval-when-compile alongside autoload in system-defaults; defcustom conversions for cj/debug-modules and cj/use-online-repos; surface the custom-file trash-binning; name package-archive priorities. - Custom editing (6): region-or-buffer scope inconsistency between text-enclose and ordering helpers; trailing-newline preservation in custom-ordering; non-file-buffer guard for cj/duplicate-line-and-comment; idempotent advice setup in external-open; comment-delimiter validation in custom-comments; state-machine coverage for cj/title-case-region. - UI / navigation (9): popper-mode :init activation defeats :disabled t; vc-git--symbolic-ref fallback in modeline; theme-aware face in cj/display-available-fonts; TTY-first frame race in font setup; per-profile cache in mousetrap-mode keymap rebuilds; symlink-aware VC modeline cache invalidation; C-s binding shadows isearch; cursor-color hook guard for non-GUI frames; nerd-icons advice deferral via with-eval-after-load. - Org workflow (3): de-duplicate org-protocol handler registration in org-webclipper; validate :url and :title in cj/org-protocol-webclip; replace global cj/webclip-current-* with structured per-invocation state. - Programming (6): load-time executable-find checks for prettier and pyright; idempotent server-after-make-frame-hook in keyboard-compat; dev-fkeys F6 typescript runner clause; prog-lsp eldoc-provider removal scope; externalize flycheck LanguageTool script path; externalize latex-config Zathura viewer. - Integrations (2): markdown-preview httpd-start side effect; externalize hardcoded SSH hostnames in eshell-config. Plus: a new "Review newly added modules" sibling task lists all 24 modules that were either added after the parent task was written (post-2026-04) or fell outside the original review-track scope lists. Each is routed to its target track; module-specific findings are filed under the relevant track above. The integrations track re-review subagent derailed mid-run; rather than re-issue it, the track's existing 16 child tasks plus the newly-added-modules findings are deemed adequate coverage. Future re-review passes can revisit if needed.
* refactor(org-roam-config): indirect node-tags accessor for testabilityCraig Jennings2026-05-151-1/+13
| | | | | | | | | | | | | | | | | | | | `cj/org-roam-filter-by-tag' called `org-roam-node-tags' directly. That accessor is generated by `cl-defstruct' and ships with a compiler-macro that inlines the call to an `aref' against the `cl-struct-org-roam-node-tags' tag variable at byte-compile time. In tests, `cl-letf' on `(symbol-function 'org-roam-node-tags)' sets the function cell but the byte-compiled call site never consults it -- it executes the inlined `aref' instead. When org-roam isn't loaded (legitimate for a tag-filter unit test), the inlined code fails with `void-variable cl-struct-org-roam-node-tags'. Wrap the accessor in `cj/--org-roam-node-tags' that calls through `funcall' with a quoted symbol. Quoted symbols skip the compiler-macro (which only fires on direct call forms), so the funcall resolves the function cell at runtime and picks up the test's `cl-letf' stub. Production behavior is unchanged; tests no longer need org-roam loaded.
* refactor(org-webclipper): use setq, not setopt, for pandoc sleep timeCraig Jennings2026-05-151-2/+8
| | | | | | | | | | | | | | | | | | | `org-web-tools-pandoc-sleep-time' is a plain float with no custom-set handler that needs to fire. `setopt' adds the entire customize-variable validation machinery -- which, lazily, depends on wid-edit being loaded. The handler's tests stub `require' so org-web-tools never really loads, then mock `setopt' via `cl-letf' on the function cell. That mock has no effect on byte-compiled code because `setopt' is a macro: the production handler has already expanded to a call into `setopt--set'. When `setopt--set' runs, it walks into the customize machinery and hits an unbound `widget-field-keymap' (wid-edit not loaded), and the test fails with a confusing wrong-type-argument. `setq' has identical runtime effect for this variable and dodges the customize machinery entirely. Tests now pass without contorted mocking.
* fix(system-commands): require keybindings at load time, not just compile timeCraig Jennings2026-05-151-1/+6
| | | | | | | | | | | | | | | | The module had `(eval-when-compile (require 'keybindings))`, which silences the byte-compiler but doesn't make `cj/custom-keymap' available when the module is required. The top-level `(keymap-set cj/custom-keymap "!" cj/system-command-map)' at the tail of the file then fails with `void-variable cj/custom-keymap'. Normal Emacs startup happened to work because `init.el' requires `keybindings' before `system-commands'. But requiring the module in isolation -- including from `make test-file FILE=test-system-commands-resolve-and-run.el' -- blows up. Fix: use a plain `(require 'keybindings)' so the load-time dependency matches the load-time reference.
* chore(todo): close gptel-toggle + buffer-source follow-up bugsCraig Jennings2026-05-151-30/+37
| | | | | | | | | | | | | | | Both follow-up sub-TODOs filed earlier today are resolved: - cj/toggle-gptel cross-module boundary is now an explicit autoload declaration in ai-vterm.el; make compile is clean and a regression test in test-ai-vterm--f9-in-vterm.el asserts the contract. - Info-mode dispatcher in cj/buffer-source-functions now returns the full org bracket-link form [[info:(manual)Node][(manual) Node]]; the existing .info.gz test asserts the new form and a new boundary test covers the uncompressed .info path. Parent tasks return to DONE. Sub-TODOs become dated done headings recording the actual work done.
* fix(custom-buffer-file): Info dispatcher returns full org bracket linkCraig Jennings2026-05-152-5/+26
| | | | | | | | | | | | | | | | The Info-mode entry in cj/buffer-source-functions copied the bare target string info:(manual)Node. Per the task body that introduced the dispatcher, the intended output is the labeled org-link form [[info:(manual)Node][(manual) Node]] -- a paste into notes lands as a clickable link with a human-readable label, not a bare URI. The label uses (manual) Node so the manual name and node name are both grep-friendly in note files. Existing test on a compressed .info.gz file now asserts the bracket form. Added a boundary test for an uncompressed .info file (the other branch of the suffix-stripping logic) so both compression shapes are locked in.
* fix(ai-vterm): autoload cj/toggle-gptel to silence cross-module warningCraig Jennings2026-05-152-0/+19
| | | | | | | | | | | | | | | | | | | | make compile warned that cj/toggle-gptel is not known to be defined when ai-vterm.el is byte-compiled. The M-F9 binding still worked during normal startup because init.el loads ai-config.el after ai-vterm.el, but the dependency was implicit -- byte-compile saw the function symbol unresolved, and loading ai-vterm.el in isolation left M-F9 bound to an undefined function. Declare cj/toggle-gptel as an interactive autoload pointing at ai-config. This silences the warning, keeps ai-vterm.el free of a load-time (require 'ai-config), and makes the load-order contract explicit: the binding works as long as ai-config eventually loads. Test asserts that requiring ai-vterm in isolation leaves cj/toggle-gptel fboundp as an autoload sigil (not a real function). A regression that adds (require 'ai-config) at the top of ai-vterm.el would flip this, and a regression that drops the autoload form would leave fboundp nil.
* chore(todo): housekeeping — music spec closeout + module review progressCraig Jennings2026-05-151-11/+112
| | | | | | | | | | | | | | | | | | | | | | | Three related housekeeping updates that piled up during the session. The "Write spec on what's needed for music-config not to depend on EMMS" task is DONE — spec lives at docs/design/music-config-without-emms.org. Adds a follow-up TODO to implement the spec, with the complexity and time estimates and the acceptance checks the spec already defines. The module-by-module review project moves from PROJECT to DOING. All six review tracks (foundation, custom editing utilities, UI and navigation, Org workflows, programming workflows, integrations and applications) move to DOING with completion-review notes appended under each. The notes summarize what was re-checked, what coverage now exists, and which child tasks are still actionable. Two new sub-TODOs add focused test coverage: - "Add UI/navigation runtime smoke coverage" — font-config, modeline-config, popper-config policy. - "Add smoke coverage for lightweight programming modules with no direct tests" — prog-general, prog-lisp, prog-training.
* chore(todo): reopen gptel-toggle and buffer-source tasks with follow-up bugsCraig Jennings2026-05-151-4/+32
| | | | | | | | | | | | | | | | | | | | Two recent DONE tasks turned out to have follow-up issues worth tracking explicitly instead of leaving them in the closed pile. The gptel-toggle work (=M-<f9>= rebind) now triggers a make compile warning that =cj/toggle-gptel= is not known to be defined when ai-vterm.el loads. The binding still works in normal startup because ai-config.el loads later, but the cross-module load-order dependency should be made explicit via an autoload declaration plus a test that loads ai-vterm.el without preloading ai-config.el. The buffer-source extension shipped an Info-mode dispatcher that copies =info:(manual)Node= rather than the documented org-style bracket link =[[info:(manual)Node][label]]=. The output is a valid org link target but not the labeled form a Notes paste would expect. Both parent tasks move back to DOING with sub-TODOs that name the remaining work, the file/test to update, and the commands to re-run.
* test(architecture): guard top-level timers + add startup-contract smoke testCraig Jennings2026-05-156-22/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a tiny source-level architecture suite at tests/test-architecture-startup-contracts.el with two checks: - Only keybindings.el may globally own the exact C-; prefix. Catches accidental cross-module rebinding before it ships. - Top-level timer scheduling (run-with-timer / run-at-time / run-with-idle-timer) must be guarded by (unless noninteractive ...) so requiring a module in batch / test mode does not schedule startup timers. Timer calls inside defuns are exempt -- the test only rejects forms that execute their body when the module loads. Four modules had unguarded top-level timer scheduling and would have tripped the new test. Wrap their startup hooks/timers in (unless noninteractive ...): - modules/org-agenda-config.el: 10s idle cache build - modules/org-refile-config.el: 5s idle cache build - modules/quick-video-capture.el: after-init-hook + 2s fallback - modules/wrap-up.el: emacs-startup-hook bury-buffers delay The contract being protected is "requiring a module in batch should not start a clock running." Test failures will now point straight at the offending file/form.
* feat(coverage): report modules missing from SimpleCov + project-module scoreCraig Jennings2026-05-153-19/+211
| | | | | | | | | | | | | | | | | | | | | | | | | =make coverage= used to print a line-weighted percentage that only saw files SimpleCov instrumented. 104 modules existed on disk but only 49 appeared in =.coverage/simplecov.json=, so the headline number was flattering: untouched modules counted for nothing. The summary script now adds two things on top of the existing report: - A =Not in SimpleCov report= section listing modules present under =modules/*.el= but absent from the SimpleCov output. Missing-module detection is exactly direct =modules/*.el=; subdirectories and =.elc= files are ignored. - A =Project module coverage= line that is module-weighted across every direct =modules/*.el= file. Tracked modules contribute their per-file coverage percentage; missing modules contribute 0%. The original line-weighted SimpleCov percentage stays as the =instrumented coverage= number. The new module-weighted score is the honest project-level reading: missing modules count as 0% without inventing a fake executable-line denominator for them. Tests assert the missing-module section, the new percentage, and the ignore rules for .elc / nested files.
* docs(design): commit music-config-without-emms spec + readiness reviewCraig Jennings2026-05-152-0/+842
| | | | | | | | | | | | | | | | | | | | | | | | | | | The spec lays out the EMMS-removal design: package-owned track and playlist structs, a narrow backend protocol with mpv as the v1 backend, state-change hooks replacing EMMS player hooks, an overlay-based selected-track marker, a fake-backend test architecture, a quantified performance budget, a 22-step parity walk, and the migration plan. The review tracks implementation readiness: which migration-plan step is safe to start, which decisions still block the rest, and the exact spec edits required. Two decisions landed this session and are now baked into the spec: - Platform support: Linux and macOS get full features; Windows runs in degraded mode (play/stop/next/previous only) because Emacs cannot natively connect to mpv's Windows named-pipe IPC. Anyone who wants full Windows parity can wire mpvc.exe shellout or a w32-* named-pipe client as a follow-up. - File-extension scope: cj/music-file-extensions stays as-is. webm and ape files in ~/music are intentionally skipped. Socket path now references temporary-file-directory instead of a hardcoded /tmp/ prefix so the spec stays consistent with the Windows section.
* docs(design): rewrite flycheck modeline customization specCraig Jennings2026-05-152-21/+337
| | | | | | | | | | | | | | | | | | Replaces the .ai/ draft (2025-11-14) with a corrected and tightened version under docs/design/. The earlier draft had stale line numbers pointing at a modeline-config.el layout that no longer exists, conflated Option 3's risky-local-variable requirement with Option 4's inline (:eval ...) approach, and missed the active-window gating convention used by the rest of the modeline. The new spec uses concrete line refs against current code, calls out flycheck-mode-line-color (which the old draft missed), recommends calling flycheck-mode-line-status-text directly instead of returning the nested (:eval ...) cons, and gates the segment to active window for consistency with cj/modeline-vc-branch and cj/modeline-misc-info. todo.org task points at the new path and drops the broken docs/flycheck-modeline-customization-spec.org link.
* docs(design): add company-to-corfu migration specCraig Jennings2026-05-152-5/+332
| | | | | | | | | | | | | | | | | | Replaces a thin third-party config snippet (one use-package corfu + one use-package cape, with no migration steps and no prescient piece) with a full spec covering the current company stack: corfu, cape, corfu-popupinfo, kind-icon, corfu-prescient. Maps every current company setting to its corfu equivalent (idle-delay, prefix-length, tooltip-limit, wrap, require-match, global-mode exclusions, doc popups, icon kinds, prescient sort). Walks the per-module fixups -- selection-framework, mail-config, ledger-config, latex-config, eshell-config, and the three prog-* mode hooks. Adds a test plan and risks section. todo.org points at the new doc; the broken :COMPLETE_CONFIG: property (which referenced the wrong line range in someday-maybe) is gone.
* feat(custom-buffer-file): extend buffer-source dispatch to mu4e and InfoCraig Jennings2026-05-153-2/+79
| | | | | | | | | | | | | | | | | Add two dispatchers to cj/buffer-source-functions so C-; b p yields a useful link form in two more major modes. mu4e-view-mode returns "mu4e:msgid:<id>" so the result pastes into org as a clickable link and matches mu4e's own org-protocol handler. Falls through to buffer-file-name when point isn't on a real message. Info-mode returns "info:(manual)node" -- the form org-info-store-link produces. file-name-base only strips one extension, so a compressed "emacs.info.gz" comes back as "emacs.info"; trim the trailing ".info" to get the bare manual name. Falls through when Info hasn't populated its current-file / current-node vars yet. Tests cover normal + boundary fallthrough for each new mode.
* chore(todo): mark org-noter insert-note rebind DONECraig Jennings2026-05-151-16/+3
|
* refactor(org-noter-config): rebind insert-note to n; sync to angle bracketsCraig Jennings2026-05-152-7/+54
| | | | | | | | | | | | | | | `cj/org-noter-insert-note-dwim' is the most-used action in a noter session; it deserves the doubled-prefix letter. Move it from `C-; n i' to `C-; n n'. Sibling-stepping moves off `n'/`p' (which were sync-next / sync-prev) onto the angle-bracket pair `>'/`<' to free up `n' and to read more naturally as direction. `.' stays as sync-current-note. Updated `which-key' labels to match. Four new ERT tests in `tests/test-org-noter-config-keymap.el' lock the keymap shape so a casual edit doesn't silently drift the layout.
* chore(todo): mark calibredb-epub defun-dedup DONECraig Jennings2026-05-151-1/+23
|
* refactor(calibredb-epub): reorder defuns above their use-package consumersCraig Jennings2026-05-151-69/+69
| | | | | | | | | | | | | | | | | | | | | | | `make compile' had been flagging `cj/calibredb-clear-filters' and `cj/nov-jump-to-calibredb' as "defined multiple times in this file" since 2026-05-12. Investigation: there's only one `(defun ...)' of each in the source -- use-package's `:bind' expansion makes the byte-compiler count the referenced symbol as a definition when the function is defined in the same file, then it sees the real `defun' later and warns about a redefinition. Reorder so each `defun' appears before the `use-package' that references it via `:bind': - `cj/calibredb-clear-filters' moved above (use-package calibredb). - `cj/nov--metadata-get', `cj/nov--file-path', and `cj/nov-jump-to-calibredb' moved above (use-package nov). The two helpers had to move with the public function so the byte-compiler doesn't emit fresh free-function warnings. Source content unchanged; only line positions move. Both duplicate-definition warnings are gone after this; full unit suite still green.
* chore(todo): mark buffer-source dispatcher DONE; file follow-up for extra modesCraig Jennings2026-05-151-1/+52
|
* feat(custom-buffer-file): make C-; b p dispatch by major-mode, with testsCraig Jennings2026-05-152-11/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old behavior: `C-; b p' called `cj/copy-path-to-buffer-file-as-kill', which only worked in file-visiting buffers and errored otherwise. That meant the most useful "give me a clickable handle on this buffer" key did nothing in eww, elfeed, dired (file-at-point ≠ buffer's default-directory), and other browsing-shaped modes. Replace with a `major-mode'-aware dispatch: - `cj/buffer-source-functions' alist maps major-mode → thunk returning a string (or nil to fall through). - `cj/copy-buffer-source-as-kill' looks up the current mode, calls the thunk, falls back to `buffer-file-name', errors only when both yield nil. - `cj/copy-path-to-buffer-file-as-kill' kept as a `defalias' for backwards compat (the old name is referenced in adjacent tests). First-batch dispatches: - eww-mode -> (eww-current-url) - elfeed-show-mode -> (elfeed-entry-link elfeed-show-entry) - dired-mode -> (dired-get-filename nil t) - dirvish-mode -> same - doc-view / pdf-view: covered by the buffer-file-name fallback (they already set buffer-file-name correctly). 10 new ERT tests cover the dispatch paths, the buffer-file-name fallback, the user-error on nil source, the alias target, and the `C-; b p' keymap entry. which-key label flipped from "copy file path" to "copy buffer source" to match. Deferred to a follow-up task: mu4e-view-mode, org-mode at a heading, help-mode, Info-mode, magit-log/commit/status, xref/grep/ compilation, image-mode, archive-mode -- each needs a format decision before implementation.
* chore(todo): brainstorm buffer-source extensions; correct EPUB nit to DONECraig Jennings2026-05-151-25/+102
| | | | | | | | | | | | | | | Modify C-; b p: add a dated subheader under the task with ideas for extending the buffer-source dispatcher beyond audio files -- three tiers (high-leverage / occasional / skip) covering eww, elfeed, mu4e, org-mode-at-heading, dired/dirvish, doc-view, magit-log, xref/grep, image-mode, archive-mode, plus an implementation sketch (dispatch alist on major-mode with buffer-file-name fallback) and a proposed rename to cj/copy-buffer-source-as-kill. EPUB centering nit: was marked CANCELLED, but the visual-review outcome was actually fine and the task is correctly closed as done (not abandoned). Flip CANCELLED -> DONE; CLOSED timestamp stays since that's when the work-state finalized.
* chore(todo): mark M-F9 gptel-toggle refactor DONECraig Jennings2026-05-141-2/+19
|
* refactor(ai-vterm): retire M-F9 buffer picker; bind to cj/toggle-gptelCraig Jennings2026-05-143-149/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | M-F9 used to invoke `cj/ai-vterm-pick-buffer' (a buffer picker narrowed to alive AI-agent buffers). In practice the F9 plain-key toggle + C-F9 project picker covered the common cases, and the buffer picker rarely earned its keystroke. Rebind M-F9 to `cj/toggle-gptel' so the F9 family covers the two main in-Emacs AI surfaces at one keystroke each: <f9> ai-vterm toggle (unchanged) C-<f9> ai-vterm picker (unchanged) M-<f9> gptel *AI-Assistant* (NEW) Removed entirely: - `cj/ai-vterm-pick-buffer' (the command itself). - `cj/--ai-vterm-pick-buffer-candidates' (its helper). - `tests/test-ai-vterm--pick-buffer-candidates.el' (deleted). Updated: - `tests/test-ai-vterm--f9-in-vterm.el' binding assertions (vterm-mode-map and global) flipped to `cj/toggle-gptel'. - Module commentary + `cj/ai-vterm' docstring describe the new M-F9 behavior. - `cj/toggle-gptel' lives in `modules/ai-config.el'; the binding stays in `ai-vterm.el' next to the rest of the F9 family so the dispatch shape is visible in one place.
* chore(todo): mark gptel model refresh DONECraig Jennings2026-05-141-7/+30
|
* chore(ai-config): refresh gptel model menusCraig Jennings2026-05-141-8/+7
| | | | | | | | | | | | | | | | | | | Anthropic: bump Opus 4.6 → 4.7 (current frontier). Sonnet 4.6 and Haiku 4.5 stay -- still current. Default `gptel-model' setq also bumped to claude-opus-4-7 in both places it was set. OpenAI: drop the cohort retired from ChatGPT on 2026-02-13 (gpt-4o, gpt-5 original, gpt-4.1, o1). Replace with the current lineup: gpt-5.5 (flagship), gpt-5.4-mini (fast/cheap), o3 (reasoning). All three are documented at developers.openai.com/api/docs/models/. Drive-by: stale docstring example in cj/gptel--current-model-selection bumped to match. gptel's bundled :models list only knows up to May-2025 IDs but gptel-make-anthropic / gptel-make-openai accept any string and pass it straight to the API, so newer names work without a gptel upgrade.
* chore(todo): queue gptel model refresh + C-; b p source extensionsCraig Jennings2026-05-141-9/+18
|
* feat(markdown-config): register markdown as an org src-block languageCraig Jennings2026-05-142-0/+34
| | | | | | | | | | | | | | | | | | | `#+begin_src markdown ... #+end_src' blocks rendered and exported fine but `org-lint' warned on every one of them ("Unknown source block language: 'markdown'"), and `C-c '' inside the block fell back to `fundamental-mode' instead of opening it in `markdown-mode' for editing. Add a `with-eval-after-load 'org' form that pushes `("markdown" . markdown)' onto `org-src-lang-modes'. New ERT test in `tests/test-markdown-config.el' asserts the entry resolves to `markdown' after `(require 'markdown-config)'. Surfaced while clearing `org-lint' on `todo.org' from 55 issues down to 1 -- the last one was this warning on a Linear ticket-body draft that was genuinely markdown. Registering the language is the right fix; relabeling the block as `text' or `example' would lose accuracy.
* chore(todo): archive today's DONE work + sync child prioritiesCraig Jennings2026-05-141-545/+536
| | | | | | | | | | | Five level-2 subtrees moved into the Resolved section: - Surface org narrowing + sparse-tree under C-; O - F9 toggle restores single-window layout (older) - AI-vterm scrollback history replaces agent buffer (older) - Add ERT coverage for modules below 70% - Fix Python tree-sitter font-lock query syntax error Five child priorities bumped to match their parents.
* chore(todo): mark org narrowing + sparse-tree task DONECraig Jennings2026-05-141-1/+14
|
* refactor(org-config): surface narrowing + sparse-tree under C-; OCraig Jennings2026-05-142-5/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Narrowing and sparse-tree commands existed in the `:bind' block on `C-c'-style shortcuts but nothing in `cj/org-map' surfaced them, so which-key never showed them and discoverability was poor. Add direct bindings under `C-; O', flat (no sub-prefixes for narrow / sparse-tree). Lowercase creates; capital of the same letter cancels: - `n' / `N' narrow-to-subtree / widen - `s' / `S' match-sparse-tree / show-all - `t' / `T' show-todo-tree / show-all - `>' / `<' forward / backward sibling narrow (kept as-is) - `R' reveal-context (no lowercase pair -- `r' is the table-row sub-prefix) Both `S' and `T' resolve to the same `org-show-all' command so the mental model is just "capital cancels the lowercase I just ran" without having to recall which letter the cancel actually lives on. Free up F2: the old `(<f2> . org-reveal)' binding in the org-mode `:bind' block is now redundant with `C-; O R'. Drop it; F2 becomes available for whatever wants it next. Four new ERT assertions in `test-org-config-keymap-ownership.el' lock the shape -- the old sparse-tree-submap test was rewritten for the flat layout and the narrow-submap test became narrow-bindings (also flat).
* chore(todo): add task to surface org narrowing + sparse-tree under C-; OCraig Jennings2026-05-141-0/+42
|
* chore(todo): mark dashboard rebalance DONECraig Jennings2026-05-141-1/+14
|
* refactor(dashboard): regroup launcher icons into 4/4/4 by purposeCraig Jennings2026-05-141-33/+39
| | | | | | | | | | | | | | | | | | | | | | Telegram had landed alone on a third row of one icon, with the first two rows holding a mixed bag (Code next to Email next to Agenda next to Files next to Music; Feeds next to IRC next to Slack next to Flashcards next to Books next to Terminal). No category showed up grouped, and the asymmetry was bugging me every dashboard open. Regroup by what the icons actually do. Three rows of four: - Row 1 Work: Code / Files / Terminal / Agenda - Row 2 Read & Learn: Feeds / Books / Flashcards / Music - Row 3 Communication: Email / IRC / Slack / Telegram Reorder the `define-key' calls on `dashboard-mode-map' to mirror the row layout -- reading the keymap top-to-bottom now matches reading the icons left-to-right. Drive-by fix in the same commit: Music had an icon but no `dashboard-mode-map' keybinding (mouse-only). Bound to `m'.