aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* feat(dirvish): make dired d=diff and D=delete to match the conventionCraig Jennings7 hours1-0/+23
| | | | dired's d was dired-flag-file-deletion and D was dired-do-delete, while the ediff diff sat on e. Bind d to the ediff diff and keep D as delete, so the d=diff / D=delete pair is consistent with C-; b and ibuffer. d no longer flags for deletion -- mark with m for batch deletes, then D. Fix the stale commentary (it called d "delete" and D "duplicate") and add which-key labels for the pair.
* fix(eat): forward word-motion arrows to the terminal in agent buffersCraig Jennings7 hours1-0/+8
| | | | C-/M-left/right were in EAT's default eat-semi-char-non-bound-keys, so they fell through to Emacs and ran left-word/right-word, moving point in the EAT buffer instead of being sent to the program. The terminal's own cursor never moved, so the next keystroke snapped point back to the real cursor -- the "cursor jumps back" symptom when editing claude's input. Bind them to eat-self-input so they forward as word motion, the way ghostel did. Window arrows (S-, C-M-) still reach Emacs for windmove and buffer-move.
* fix(eat): make Escape the unified copy-mode exitCraig Jennings11 hours1-0/+15
| | | | EAT's semi-char mode left the bare escape key unbound and treated ESC only as the Meta prefix, so a lone Escape never reached the pty. That is why C-<up>'s tmux copy-mode could not be exited with Escape: tmux's own Escape=cancel binding never saw the key. Bind <escape> to forward ESC to the terminal, so it cancels tmux copy-mode and still works in TUIs like vim. Also bind <escape> in eat-mode-map to return to semi-char, so the same key exits EAT's own emacs and char modes. One exit key for both copy views; q is no longer required.
* chore(ibuffer): put diff on d and delete on DCraig Jennings12 hours1-0/+9
| | | | In the ibuffer buffer list, d now diffs the buffer at point against its saved file (ibuffer-diff-with-file, was on =) and D marks it for deletion (was on d; x still executes the marks).
* refactor(term): finish ghostel retirement (phase 5)Craig Jennings12 hours16-44/+32
| | | | Remove the dead ghostel app from theme-studio: the GHOSTEL_FACES/SEED data, the registry row, the renderGhostelPreview previewer, and the package_seed test, then regenerate the tool. ansi-color stays since eat inherits it. Rename testutil-ghostel-buffers to testutil-terminal-buffers and drop make-fake-ghostel-buffer; the toggle-filter test now uses the eat fixture, since agents are eat. Fix the comments that still called the agent buffers ghostel (they're eat now) in eat-config and the ai-term and auto-dim test docstrings. I also package-deleted the unused ghostel ELPA package. Full suite green; the remaining ghostel mentions are accurate migration history.
* feat(external-open): open videos in a looping playerCraig Jennings14 hours1-4/+81
| | | | Opening a video from dirvish routed through cj/xdg-open to the OS default handler, which plays it once. I pulled the video extensions into their own cj/video-extensions list and route them through a new cj/open-video-looping, which launches mpv with --loop-file=inf (the player and its args are both customizable) detached, so the video plays on repeat. Audio and office docs still use the OS default handler. The find-file advice already covers dirvish RET, so this applies wherever a video is opened.
* test(init): drop deleted term-config from the classified-modules list; mark ↵Craig Jennings17 hours1-1/+0
| | | | consolidation phase 4 done
* refactor(term): retire ghostel, migrate copy-mode and tmux-history to eat-configCraig Jennings17 hours3-293/+74
| | | | Complete the EAT consolidation by removing ghostel. ai-term and F12 already run on EAT, so ghostel's only remaining users were the dashboard launcher and term-config itself. Migrate the terminal-generic pieces into eat-config: the tmux copy-mode (C-<up> enters it, the same UX and keybinding as before, since agents run EAT over tmux) and the tmux-history capture, swapping ghostel-send-string for a pty write and the mode checks to eat-mode. Repoint the dashboard "Launch Terminal" to the eshell/EAT toggle, swap the face-diagnostic terminal-mode check to eat-mode, and refresh auto-dim's comment. Delete term-config.el and its init require. EAT's default semi-char non-bound-keys already lets windmove, buffer-move, and the Emacs essentials reach the terminal. Tests retargeted; the obsolete ghostel-keymap-exceptions tests are dropped.
* feat(ai-term): run agents through EAT instead of ghostelCraig Jennings18 hours2-67/+59
| | | | Port ai-term from ghostel to EAT. Agents spawn in an EAT terminal running the same tmux session (tmux new-session -A -s aiv-<project>), so the persistence and detach/reattach model is unchanged. A spike confirmed EAT + tmux detach and reattach exactly like ghostel + tmux. The swaps: (ghostel) becomes (eat) with eat-buffer-name carrying the agent name, ghostel-send-string becomes a process-send-string helper, and the M-SPC swap chord is bound directly in eat-semi-char-mode-map (no exception-list plus rebuild dance). Buffer detection was already name-based, so the dispatch, next, and cycle logic is unchanged. Dropped the now-unused suppress-tmux variable. Tests updated to mock eat.
* feat(eshell): zsh-parity prompt segments and zoxideCraig Jennings18 hours1-0/+75
| | | | Bring eshell closer to the zsh terminal it replaces. The prompt now shows the git branch (read from .git/HEAD, no subprocess, skipped on remote so TRAMP stays fast) and a [N] exit-status segment when the last command failed, matching the zsh prompt's info. Add a zoxide z command and an eshell-directory-change hook that feeds zoxide add, sharing the same frecency database as the zsh shell. New tests cover the pure prompt helpers.
* refactor(term): F12 opens eshell-through-EAT, retire eshell-toggle and ↵Craig Jennings18 hours2-21/+31
| | | | | | xterm-color Point the F12 dock-and-remember toggle at eshell instead of a standalone EAT zsh shell, so the primary terminal is eshell running through EAT (eat-eshell-mode): elisp functions as commands, TRAMP transparency, and EAT rendering visual commands. Drop the eshell-toggle package and its C-<f12> binding, since F12 covers it now. Drop xterm-color from eshell, since EAT handles ANSI color natively and its TERM=xterm-256color fought EAT's own. The toggle's buffer predicate now matches eshell-mode; the toggle tests and fixture are updated.
* refactor(term): extract eat-config.el from term-config.elCraig Jennings19 hours3-3/+3
| | | | Move the eat use-package, the F12/C-; keymap wiring, and the F12 dock-and-remember toggle out of term-config.el into a dedicated eat-config.el. term-config.el keeps ghostel (ai-term's backend) and requires eat-config for cj/term-toggle and cj/turn-off-chrome-for-term. Pure relocation, no behavior change. First step toward consolidating on EAT and retiring ghostel. The toggle tests now require eat-config.
* feat(term): toggle EAT instead of ghostel on F12Craig Jennings25 hours2-20/+40
| | | | F12 now creates and toggles a single EAT terminal (pure-elisp, fully themeable) instead of a ghostel one, reusing the existing dock-and-remember geometry toggle. ghostel stays for ai-term on M-SPC. The EAT terminal runs a plain shell with no tmux. F12 and C-; are bound in EAT's semi-char and mode keymaps so they reach Emacs from inside the terminal (EAT forwards unbound keys to the shell otherwise). Retargeted the toggle's buffer predicate and create-new path from ghostel to EAT, and updated the buffer-filter tests to the EAT semantics.
* fix(transcription): land video transcripts beside the source, not in /tmpCraig Jennings27 hours1-0/+22
| | | | The video flow extracts audio to a temp .mp3 in /tmp, then derived the .txt/.log from that temp path, so transcripts landed in /tmp and died on reboot, contradicting the "alongside the source" docstring. Thread the source video through cj/--start-transcription-process as an optional output base so the outputs derive from it (talk.mp4 -> talk.txt beside the video). Audio is unchanged. New regression test pins the output base to the source video.
* fix(calendar-sync): atomic writes, curl --fail, and zero-event vs garbageCraig Jennings27 hours2-3/+76
| | | | Three robustness fixes from the config audit. (1) calendar-sync--write-file and --save-state now write a temp file in the same directory and rename it into place, so org-agenda or chime reading mid-write never sees a half-written calendar. (2) The two curl fetches gain --fail, so an HTTP 404/500 error page exits non-zero instead of flowing its HTML into conversion. (3) calendar-sync--parse-ics distinguishes a healthy zero-event calendar (a real iCalendar with BEGIN:VCALENDAR and no in-window events returns the header) from garbage (no VCALENDAR returns nil), so a near-empty calendar no longer reports "parse failed". New robustness tests; the empty-calendar boundary test updated to the corrected behavior. Verified against the live feed: all three calendars fetch and write cleanly.
* chore(dashboard): use the nf-cod-library codicon for the Calibre launcherCraig Jennings28 hours1-1/+2
| | | | Closer to the actual Calibre logo than the faicon book-open. Switches the launcher's icon function to nerd-icons-codicon, adds the matching declare-function, and adds nerd-icons-codicon to the test's icon mock.
* test(ai-term): isolate layout-capture globals in collapse-split testsCraig Jennings32 hours1-2/+12
| | | | The multi-window and single-window collapse tests call cj/ai-term, which captures the current layout into cj/--ai-term-last-direction / cj/--ai-term-last-size on toggle-off, but only let-bound cj/--ai-term-last-was-bury. They leaked last-direction into the display-rule test, whose display-saved action reads those globals to choose the split direction, so its agent buffer split below instead of right and the assertion failed. Let-bind last-direction and last-size to nil, matching the roundtrip test in the same file. Full ai-term suite is green.
* feat(ai-term): step into detached sessions too, attaching themCraig Jennings32 hours4-75/+100
| | | | The next-agent step (C-; a n / M-SPC) cycled only live agent buffers, so a detached session (alive in tmux, no Emacs buffer) was reachable only through the picker. Now the queue is every active agent, live buffer or live session, keyed on the project dir and ordered by buffer name. Stepping onto a detached one attaches it: show-or-create recreates the terminal, which reattaches the tmux session. The live-buffer swap path is unchanged. I replaced the buffer-rotation helper with a dir-based one and added an active-agent enumerator, with 10 tests.
* test(lsp): narrow startup smoke test for prog-lsp config resolutionCraig Jennings39 hours1-0/+66
| | | | Pins the load-time invariants of the central LSP module: lsp-enable-remote stays nil (no auto-start on TRAMP files), the file-watch-ignore defaults live in one idempotent helper, the eldoc provider is stripped from the global hook, and no mode accrues a duplicate lsp-deferred entry. Tests the top-level :init and helper surface, since :config defaults defer to lsp-mode's own load under make test.
* feat(google-keep): org-page renderer, refresh command, keybindings (Phase 2-3)Craig Jennings40 hours1-0/+142
| | | | The elisp side of the Keep integration: a pure JSON-to-org core (parse, tag/heading/render helpers) kept free of .emacs.d specifics for later extraction, plus the IO runner cj/keep-refresh (async make-process + sentinel, atomic temp-then-rename write to keep-file, stderr-token to display-warning) and the glue (C-c k prefix, executable warning, require in init.el). 15 ERT tests over the core and the parse-render-write chain. Read-only v1; live fetch needs the one-time gkeepapi + token setup.
* fix(calendar-sync): re-derive status from a declined occurrence overrideCraig Jennings41 hours1-0/+37
| | | | A recurring event declined for one occurrence still synced with :STATUS: accepted, because apply-single-exception merged the override attendees but never re-derived the user's status from them, so filter-declined never dropped it. Re-derive :status via find-user-status when the exception overrides :attendees, leaving the inherited status when the override doesn't name the user. Four new tests cover declined, accepted, no-attendee, and user-absent overrides.
* fix(dirvish): point the bg wallpaper command at set-wallpaper on WaylandCraig Jennings42 hours1-2/+2
| | | | The Wayland branch of cj/--wallpaper-program-for returned swww, but this system's wallpaper daemon is awww, so dirvish "bg" silently no-opped. Point it at the set-wallpaper script (on PATH via dotfiles), which wraps awww img and persists the choice to waypaper's config. X11 still uses feh. Updated the wallpaper-program test to match.
* chore(elisp): clear byte-compile warnings (org, music, org-roam)Craig Jennings2 days1-3/+3
| | | | | | Move own-command bindings out of use-package :bind to keymap-global-set / with-eval-after-load (C-c C-a org-appear-toggle, R music radio-station, C-c n r/t roam recipe/topic) — same keys, verified live. Pull music-config helper defuns out of :config/with-eval-after-load to top level (their proper home; emms referenced only at call time via declare-function). Swap obsolete org-show-all for org-fold-show-all (9.6). Plus declare-function/defvar for lazy symbols. No behavior change; full suite + launch smoke green. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
* chore(elisp): clear byte-compile warnings (mail, dashboard, eshell, erc)Craig Jennings2 days1-4/+5
| | | | | | Add declare-function/defvar declarations for lazily-loaded package functions and variables so each module compiles cleanly standalone, reflow over-long docstrings, and swap the obsolete erc-server-buffer-p for its named replacement erc-server-or-unjoined-channel-buffer-p (obsolete since 30.1). No behavior change. Two erc setq targets (erc-unique-buffers, erc-generate-buffer-name-function) appear not to be real ERC variables — declared to silence the warning with a NOTE flagging that the intended buffer-naming may not be taking effect. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
* refactor(org-refile): drop roam Project notes as refile targetsCraig Jennings2 days1-5/+6
| | | | | | Stop scanning org-roam notes tagged "Project" for refile targets; keep the "Topic" scan. Behavior change by decision: roam Projects are no longer pulled in anywhere (the agenda never scanned them either — that was a stale doc claim, corrected separately). Refiling into Topic notes and into per-project todo.org files is unchanged. Test reworked to assert Topic is included and Project is not. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
* fix(org-agenda): filter missing base files; drop the roam-source doc claimCraig Jennings2 days1-17/+40
| | | | | | cj/--org-agenda-base-files now drops files that do not exist (a fresh machine may lack the synced calendars or the inbox), and org-agenda-skip-unavailable-files is set as a backstop, so org-agenda never prompts to create a missing path — the interactive-prompt class that once hung the chime daemon. The filter lives in the one shared helper, so the agenda builders, single-project view, and the chime initializer all get the existence check. Also correct the docs: the commentary and docstrings claimed org-roam nodes tagged "Project" are agenda sources, but they were never scanned; roam Project/Topic notes are refile targets (org-refile-config.el), not agenda sources. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
* feat(ai-term): wrap-teardown + shutdown entry points for rulesetsCraig Jennings2 days3-0/+198
| | | | | | Add the three headless functions the rulesets wrap-it-up workflow calls via emacsclient -e, since this module owns the aiv- session naming, the agent buffer, and the geometry restore. cj/ai-term-quit kills a project's tmux session and agent buffer and restores the layout, idempotent and safe when already gone. cj/ai-term-live-count returns the integer count of live aiv- sessions for the shutdown safety gate. cj/ai-term-shutdown-countdown re-checks that gate, then runs an abort-able run-at-time countdown in the echo area and, uncancelled, runs the shutdown command (a defcustom so tests stub it). Reuses the existing kill/close helpers. 13 ERT tests cover the live-count parsing, the quit kill-and-idempotency, and the gate-abort/cancel/tick logic; the tmux and shutdown side effects are manual. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
* test(nerd-icons): dir-precedence probe + legend round-trip (phase 4)Craig Jennings2 days1-0/+15
| | | | | | Lock the dir-precedence decision with an ERT probe: when a dir icon already carries nerd-icons-completion-dir-face, the advice's prepended nerd-icons-yellow is first in the face list and wins. Extend the #nerdiconstest browser gate with an export/import round-trip over an assigned nerd-icons color, asserting it re-imports to the same state and that the separate nerd-icons-completion dir-face stays out of the nerd-icons app. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
* feat(nerd-icons): drop the runtime tint so the theme drives icon color (phase 3)Craig Jennings2 days1-63/+0
| | | | | | Remove cj/nerd-icons-tint-color, cj/--nerd-icons-color-faces, cj/nerd-icons-apply-tint and its two call sites, so the 34 nerd-icons color faces are no longer force-set to one darkgoldenrod foreground at load time. The WIP theme already owns those faces (theme-studio auto-discovered them), so with the tint gone their per-filetype colors come from the theme and are editable in theme-studio's new nerd-icons pane. The dir-icon advice (cj/--nerd-icons-color-dir) stays — it points at a theme-owned face now. Delete the apply-tint test, which covered removed code. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
* fix(term): scope copy-mode to C-<up> and don't re-enter mid-copyCraig Jennings3 days1-62/+76
| | | | | | Today's modified-arrow work bound every C-arrow and M-arrow to copy-mode, which swallowed C-<left>/C-<right> — readline word-motion at the shell prompt. Bind only C-<up> (enter copy-mode and scroll up); the other arrows pass through to the terminal again. C-<up> pressed while already in copy-mode now just moves up: cj/term-copy-mode-up checks tmux pane_in_mode (and ghostel--input-mode without tmux) and skips re-entry, which would otherwise reset the cursor to the start of the line. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
* fix(latex): activate the latexmk workflowCraig Jennings3 days1-0/+62
| | | | | | Two breaks kept latexmk from ever engaging. The :hook key TeX-mode-hook expanded to the unbound TeX-mode-hook-hook, since use-package appends -hook to any symbol not ending in -mode, so TeX-command-default was never set; name the mode TeX-mode instead. Separately auctex-latexmk was :defer t with no trigger, so auctex-latexmk-setup never ran and latexmk never joined TeX-command-list; load it :after tex. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
* feat(face-diagnostic): make report face names describe-face buttonsCraig Jennings3 days2-0/+26
| | | | | | Render each real face name in the Face Diagnosis report as a button that runs describe-face on it, carrying the face as button data; anonymous specs and non-faces stay plain text. Also add face-diagnostic to the module-header allowlist now that it is required in init.el and carries the header contract. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
* feat(term): modified arrows enter copy-mode and carry directionCraig Jennings3 days1-0/+81
| | | | | | C-<arrow> and M-<arrow> in a ghostel buffer now enter copy-mode and move one step in that direction in a single stroke. The tmux path writes the arrow escape sequence into the pty so the copy cursor follows it; without tmux the same keys enter ghostel-copy-mode and move point. All eight keys join ghostel-keymap-exceptions and the semi-char map is rebuilt, so they reach Emacs instead of the terminal program. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
* feat(ai-term): move keybindings to C-; a and M-SPC, retire F9Craig Jennings3 days3-58/+93
| | | | | | | | I moved the ai-term family off the F9 keys onto the C-; a prefix, vacated when gptel was archived: a toggles the agent, s opens the project picker, n swaps to the next agent, k closes one. The frequent swap also gets M-SPC as a fast chord, bound in ghostel-mode-map and added to the semi-char exceptions so it reaches Emacs from inside an agent buffer. cj/ai-term-next now opens the project picker when no agent is running instead of erroring, so the swap key doubles as a "start an agent" key. To free M-SPC, I removed jumper's M-SPC binding. Jumper's commands stay reachable via M-x, with a cleverer home pending review.
* chore(ai): archive gptel and remove it from the live configCraig Jennings3 days33-5220/+0
| | | | | | | | | | I archived gptel to archive/gptel/ since I rarely use it. Moved there: the six gptel modules (ai-config, ai-conversations, ai-conversations-browser, ai-mcp, ai-quick-ask, ai-rewrite), the gptel-tools/ directory, custom/gptel-prompts.el, their test files and utilities, and the four gptel-only specs. Scrubbed from the live config: the ai-config require in init.el, which also drops the whole C-; a keymap; the gptel-mode emojify hook in font-config.el; the gptel-tools entries in the Makefile clean target and the coverage runner; and the gptel feature notes in README. Cancelled the open gptel tasks in todo.org (the AI Open Work issues, the feature-extension brainstorm, the velox gptel-magit bug). ai-term stays. It is the ghostel Claude launcher, independent of gptel. Verified: every module loads, a batch init launch reaches completion clean, and the full test suite shows only pre-existing coverage failures unrelated to this change.
* fix(jumper): free registers on removal, skip dead markers, toggle backCraig Jennings4 days1-0/+179
| | | | Three defects in the saved-location store: removal shifted the slot vector but never freed the dropped register, and a later store allocated by next-index — a char a surviving slot still held — so it silently overwrote that slot's marker. jumper--with-marker-at also guarded only markerp, so a location whose buffer was killed made store and jump signal wrong-type errors. And the single-location toggle never returned: its already-there branch did nothing. Store now takes the first unused register char in the live slice, removal clears the freed register so its marker stops pinning the buffer, the marker guard checks buffer liveness so dead entries are skipped, and the toggle jumps to the last-location register when one is set.
* fix(coverage): normalize report and diff paths before intersectingCraig Jennings4 days1-0/+123
| | | | simplecov reports absolute source paths while git diff emits repo-relative ones, so cj/--coverage-intersect joined them by exact key and matched nothing — every changed file read ":tracked nil" under the working-tree, staged, and branch scopes (whole-project worked only because both sides came from the same simplecov source). A new cj/--coverage-relativize-keys normalizes both tables to repo-relative in cj/--coverage-read-and-display before the intersect; the intersect stays pure. Covered by 5 unit tests plus an integration test that drives the real parsers with an absolute-key report and a relative-key diff.
* feat(dirvish): add Hyprland Super+F popup with focus-loss dismissCraig Jennings4 days1-0/+248
| | | | A single-instance Dirvish popup frame (named "dirvish") for a Hyprland Super+F launcher, mirroring the org-capture popup. q closes the frame; in the popup, RET opens files through the OS handler so they launch independently, and the frame dismisses itself on focus loss. A second launch reuses the open popup instead of spawning another frame.
* test: make subr mocks variadic for native-comp, add arity meta-testCraig Jennings6 days61-202/+315
| | | | | | | | Re-enabling native-comp surfaced a suite-wide fragility. When a test redefines a C primitive (or a native-compiled function), native-comp routes native callers through a trampoline that calls the mock with the primitive's maximum arity. A fixed-arity mock narrower than the primitive then throws wrong-number-of-arguments, intermittently, as the eln-cache fills. I swept every arity-narrow subr mock to append &rest _ (188 sites, preserving any named args the body uses), and added tests/test-meta-subr-mock-arity.el, which fails make test on any subr mock too narrow for the primitive's arity. The rule isn't "never mock a subr". The suite mocks message and completing-read freely. It's "a subr mock must accept the primitive's arity." Background, the three failure modes, and the research are in docs/native-comp-subr-mocking.org.
* fix: load games-config via the malyon hook, not an autoload chainCraig Jennings6 days1-14/+22
| | | | | | | | The previous deferral (03d8b587) autoloaded malyon to games-config, but games-config doesn't define malyon. It leaves the command to the malyon package, so M-x malyon loaded games-config, found malyon still undefined, and errored "Autoloading games-config.el failed to define function malyon". Emacs won't chain through a second autoload. malyon and 2048-game autoload their own commands via package.el, so games-config should never own them. init.el now loads games-config via (with-eval-after-load 'malyon ...), and games-config just sets malyon-stories-directory when malyon loads. M-x malyon loads the package as a real command, then games-config applies its config. The earlier batch check loaded the files by hand and missed the autoload failure. The new test resolves the autoload the way M-x does (autoload-do-load), so the real path is covered now.
* refactor: defer games-config behind autoloads (load-graph Phase 4)Craig Jennings6 days1-0/+38
| | | | | | init.el eagerly required games-config at startup just to configure two on-demand game packages. package.el already autoloads malyon and 2048-game, so the eager require bought nothing but the one setting the module adds (malyon-stories-directory). init.el now autoloads malyon and 2048-game to games-config instead of requiring it. The first game command loads the module, which configures then loads the package. Startup no longer touches games-config, and both the commands and the stories-directory setting still work. This is the first module of the Phase 4 low-risk batch.
* perf: re-enable native-comp JIT and hand GC to gcmhCraig Jennings6 days2-27/+0
| | | | | | | | early-init.el disabled JIT native compilation with (setq native-comp-deferred-compilation nil), the obsolete alias of native-comp-jit-compilation. Despite the comment, setting it nil turns JIT off entirely rather than making it synchronous. Most modules then ran interpreted for the daemon's lifetime, and the native-comp-speed/jobs settings in system-defaults.el were dead. The "Selecting deleted buffer" async race that prompted the disable was an Emacs 28/29 issue. This is 30.2. I re-enabled it with native-comp-jit-compilation t and silent async warnings. GC was pinned at the stock 800KB: early-init restored it post-startup and the minibuffer setup/exit hooks bounced back to it. That's Emacs's bare-editor default, far too low for 184 packages, so GC pauses fired often during completion, agenda, and LSP/AI work. I replaced both hand-rolled mechanisms with gcmh, which keeps the threshold at 1GB during activity and collects on idle. Verified a clean full launch in a throwaway daemon (JIT on, gcmh active, no backtrace) and gcmh's threshold cycle in batch.
* test(term): fix F10-exceptions test after C-<f10> shutdown moveCraig Jennings6 days1-8/+9
| | | | The s-F9 commit moved server-shutdown off C-<f10> to C-x C and dropped C-<f10> from the ghostel keymap-exceptions. The regression test still asserted C-<f10> was present, so the full suite went red. I updated it to assert <f10> (music) stays an exception and C-<f10> is now absent, since C-x C deliberately forwards to the terminal program inside an agent buffer.
* feat(ai-term): add s-F9 step-to-next-agent, drop C-S-F9 close aliasCraig Jennings6 days2-8/+83
| | | | | | s-F9 (cj/ai-term-next) steps through the open agent buffers in name order. It's the "switch among existing agents" surface F9's toggle never provided. The cycle logic lives in a pure helper (cj/--ai-term-next-agent-buffer) with Normal/Boundary/Error coverage. The command is a thin window-mutating wrapper. I dropped the C-S-F9 close alias, leaving M-F9 as the sole close binding. I moved cj/server-shutdown off C-<f10> to C-x C so the key keeps forwarding to the terminal program inside an agent buffer. I also removed the now-unused F10 entries from term-config's ghostel exceptions.
* refactor(dwim-shell): extract the branching command-string buildersCraig Jennings6 days1-0/+55
| | | | | | | | | | Lift the command-string construction out of three :config commands whose templates branch — video-trim (Beginning/End/Both), tar-gzip (single vs multi), text-to-speech (darwin say vs espeak) — into top-level pure builders cj/dwim-shell--video-trim-command / --tar-gzip-command / --text-to-speech-command, leaving thin interactive wrappers that prompt and delegate. The builders are now testable under make test (the :config defuns aren't), mirroring the existing dated-backup/zip-single builders. Adds 8 Normal/Boundary/Error tests.
* fix(ai-term): keep the F9 toggle reversible in a 3+ window layoutCraig Jennings6 days1-0/+41
| | | | | | | | | | | | | | | | In a layout where the agent had its own split window (e.g. code on top, a working window, and the agent below), toggling the agent off deleted its window correctly, but toggling back on reused the working window at the edge -- displacing its buffer and collapsing three windows to two. The slot-reuse that avoids a third window on a fresh show was firing on a re-show after the agent's own window was already deleted. Flag the toggle-off that deletes the agent's own window; on the next toggle-on, reuse-edge-window consumes the flag and falls through to a fresh re-split, so the agent returns to its own window and the other windows are untouched. The flag only changes the 3+ window case -- after a delete in a 2-window slot-reuse layout one window remains, where re-split and reuse-edge already coincide, so the existing reuse-edge tests are unaffected.
* fix(ai-term): stop F9 toggle shrinking the agent window each cycleCraig Jennings6 days4-21/+31
| | | | | | | | | | | | | | | | | The F9 toggle captured the agent window's body-height and replayed it as body-lines. Body-height subtracts the mode line's pixel height, which differs between an active and an inactive mode line; the agent is captured active but redisplayed inactive, so under a theme whose mode-line-inactive is shorter than a text line the window lost ~1 line per toggle. Capture and replay total-height for the vertical axis instead, via the renamed cj/window-replay-size. Total-height is identical active or inactive and has no mode-line-pixel dependence, so the round-trip is a fixed point. Width keeps body-width (total-width has the position-dependent divider problem that total- height does not). The shared lib fix covers the F12 terminal toggle too. The shrink only manifests in a GUI frame, so it is not reproducible in the batch harness; the unit tests pin the new total-height contract.
* refactor(dirvish): extract playlist-target resolution from the create commandCraig Jennings6 days1-0/+55
| | | | | | | Lift the name-validate plus overwrite-prompt loop out of cj/dired-create-playlist-from-marked into cj/--playlist-resolve-target, leaving the command a flat filter -> resolve -> write. Add Normal/Boundary/Error tests for the new seam (real temp music-dir, stubbed prompts only).
* refactor(calendar-sync): extract per-event recurrence-exception parserCraig Jennings6 days1-0/+64
| | | | | | | Lift the 14-binding let* body out of calendar-sync--collect-recurrence-exceptions into calendar-sync--parse-exception-event, which returns the exception plist (or nil) for one VEVENT; the collector's dolist becomes a thin uid + puthash. Add Normal/Boundary/Error tests for the new pure helper.
* refactor(elfeed): extract HTML-entity decoder, drop leftover DEBUG loggingCraig Jennings6 days1-0/+31
| | | | cj/youtube-to-elfeed-feed-format hand-decoded an og:title with six sequential replace-regexp-in-string calls; extract cj/--decode-html-entities (alist-driven, &amp; first) and call it. Also remove the leftover DEBUG cj/log-silently instrumentation from cj/extract-stream-url. Behavior unchanged; adds coverage of the decoder.