aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* feat(agenda): suspend auto-dim while the agenda frame is openHEADmainCraig Jennings6 hours1-0/+70
| | | | The refresh tick's selection swing marks the working window non-selected, and auto-dim's debounced dim lands after the tick, so the working frame visibly dimmed every five minutes. Spawn now turns auto-dim-other-buffers-mode off (remembering it was on) and closing the frame restores it. A spawn with auto-dim already off touches nothing. It also keeps the standing agenda fully lit instead of dimmed-when-unfocused.
* fix(agenda): hide the refresh tick's selection flickerCraig Jennings6 hours1-0/+32
| | | | The rebuild takes a second or two, and for its whole duration the agenda window was the selected window, so the cursor visibly went hollow in the working frame on every tick. It read as focus theft, though no focus function ever ran. The tick now inhibits redisplay (the synchronous rebuild blocks Emacs anyway, so this costs nothing) and restores selection before redisplay resumes. A tick that would fire during an active minibuffer is skipped.
* fix(agenda): repair the refresh tick, tighten the gutter, allow point motionCraig Jennings6 hours1-2/+47
| | | | | | | | Every 5-minute refresh failed. The F command's general settings carried (org-agenda-sticky t), and those settings are baked into the buffer's series-redo-cmd and re-applied on each redo. With the buffer already existing, org-agenda-use-sticky-p turned true mid-redo and org-agenda-prepare threw 'exit ("use r to refresh") to a catch that doesn't exist inside org-agenda-redo. I removed sticky from the command settings (the spawn wrapper still binds it, which is where the buffer gets its name) and kept the redo path free of sticky, since org-agenda-redo handles the in-place rebuild itself. Verified with a real tick against a live frame: rebuild succeeds, the failure banner clears, the latch resets. The wide gutter between the source column and the item was the global agenda prefix format's 25-char category pad. The F view now sets its own format with a 10-char pad. C-a hit the deny catch-all. I allowlisted read-only point motion (C-a, C-e, C-f, C-b) and isearch (C-s, C-r).
* fix(agenda): keep the agenda frame a single full-height agenda windowCraig Jennings7 hours1-1/+40
| | | | | | | | The frame spawned with the working buffer in its top quarter and the agenda below at 75%. The sticky setting inside the F custom command applies too late to name the buffer, so it rendered as plain *Org Agenda*, and that name matches the 0.75 below-selected display rule in org-agenda-config.el, which split the brand-new frame. I bind org-agenda-sticky and current-window dynamically around the render, so the buffer is *Org Agenda(F)* (no display rule matches it) and it takes the frame's sole window. A delete-other-windows after the render is the belt in case any future rule still splits. The frame is also named "Full Agenda" now so it's recognizable at a glance and WM rules can target it.
* fix(agenda): make C-x C-c close the agenda frame, not the daemonCraig Jennings7 hours1-0/+8
| | | | The catch-all denied it before, and letting the global through would be worse: save-buffers-kill-terminal on a make-frame frame has no client to close, so it kills the daemon. Inside the frame the gesture now runs the frame close.
* fix(agenda): stop the frame's catch-all from swallowing input machineryCraig Jennings7 hours1-3/+62
| | | | | | | | The default-deny [t] binding intercepted far more than Org commands. switch-frame events hit the deny handler, so every focus change into or out of the frame spammed the read-only message and broke frame switching. Mouse wheel, mouse-1 clicks, and the help prefix were dead. And S-<f8>/C-M-<f8> were never bound in the mode map, so the frame's own toggle couldn't close it from inside. I punched the machinery through the catch-all (an explicit nil shadows the [t] default in the same map, so those events fall through to their global bindings) and bound the two frame controls per the spec's allowlist. Two redo-lifecycle bugs rode along, both from org-agenda-mode's kill-all-local-variables: the buffer-local kill-buffer-hook was stripped on the first refresh tick (killing the buffer would orphan the frame), and the failure banner was held in a buffer-local var while its overlay survives erase-buffer, so a banner could never be removed after a later success. The finalize re-enable now re-adds the hook, and the banner is tagged with an overlay property and found by scanning.
* fix(agenda): spawn the agenda frame tiled, not compositor-fullscreenCraig Jennings7 hours1-0/+10
| | | | I dropped (fullscreen . fullboth) from the spawned frame so a tiling WM places it side by side with the working frame. "Fullscreen" was the wrong word for the intent: a normal frame at its full tiled position, not one covering the whole output. The engage-routing and focus logic are unchanged and matter more now, since a task opens in the adjacent working pane.
* feat(agenda): add S-<f8> dedicated fullscreen agenda frameCraig Jennings8 hours1-0/+736
| | | | | | | | I added a standing agenda surface in its own fullscreen frame of the daemon, placeable on its own workspace while the working frames stay untouched. S-<f8> spawns, raises, or closes it. The force-rescan moves to C-M-<f8>. It shows a today-anchored seven-day view and refreshes every five minutes through org-agenda-redo, so the now-line and synced events stay current without re-scanning the file list. A default-deny minor mode keeps it read-only: only navigation, the engage keys (routed to the working frame), and the frame's own controls are allowed. A failed redo falls back to the last-good snapshot with cloned markers, so the frame is never blank or unrestricted. I made it a frame of the daemon rather than a second process, so it shares the live state (calendar-sync, edits, the now-line). There's no startup auto-open, and the Hyprland-managed-window variant is a vNext once this proves out.
* feat(fontaine): rename Coding to Coding M, add Coding L at 14ptCraig Jennings14 hours1-11/+13
| | | | | The Berkeley Mono code ladder is now Coding XS (11pt), Coding M (13pt), Coding L (14pt), and Coding XL (16pt).
* feat(ai-term): M-SPC cycles attached agents, M-S-SPC cycles allCraig Jennings14 hours2-6/+68
| | | | | | | | | | | | M-SPC now steps only through attached agents (the ones with a live on-screen buffer), so the fast chord stays among what's already up. M-S-SPC steps through all active agents and attaches a detached tmux session when it lands on one, which is what M-SPC used to do. I moved the shared step logic into cj/--ai-term-step-among and added cj/--ai-term-attached-agent-dirs to filter the queue to attached buffers. I bound both chords globally and in eat-semi-char-mode-map so they work from inside an agent buffer. C-; a n keeps cycling all.
* feat: add workflow font profilesCraig Jennings26 hours3-105/+255
| | | | | | I replaced the mixed Fontaine presets with seven named profiles that persist across restarts. The mode line, echo area, and minibuffer stay in Berkeley Mono. Nov applies the shared Reading profile inside each EPUB buffer without changing the global selection.
* fix(shell): require external-open, scope tramp revert, drop dead configCraig Jennings2 days2-9/+39
| | | | | | | | - dirvish-config, dwim-shell-config: both call cj/xdg-open (external-open) but relied on init.el requiring it before them, and dirvish's require comment misattributed it to system-utils. Added the require to both and corrected the comment and both Runtime-requires headers. - tramp-config: revert-without-query was set to '(".*") inside the TRAMP module, so every file in Emacs reverted without confirmation. Scoped it to the TRAMP path regexp, so local files keep their revert prompt and remote files skip the round-trip. - tramp-config: removed the sshfast method (referenced nowhere, scp and sshx handle everything) and a duplicate tramp-own-remote-path add-to-list. Tests: new runtime-requires assertions for both modules, red first under make test-file. The tramp :config edits are verified in the daemon. Suite green.
* fix(dev): repair hunk jump, F4 hook leak, async clone, and nil guardsCraig Jennings2 days10-86/+505
| | | | | | | | | | | | - vc-config: C-; v d matched literal +/- source text via consult-line, not gutter hunks. It now completes over git-gutter's hunk list and jumps to the chosen line. - vc-config: clipboard clone ran git synchronously, freezing every frame for the whole clone. It now runs async with a sentinel that opens the clone on success and surfaces the process buffer on failure. - vc-config: magit-blame bound D and S to the same command. D is now difftastic-magit-diff, matching the transient. - vc-config: dropped the :commands autoload for git-timemachine-show-selected-revision, a function the package never defined. The phantom appeared in M-x and errored. - dev-fkeys: both F4 chained-compile handlers armed a hook on the global compilation-finish-functions before their compile ran, so a quit left it live and the next unrelated compile fired the chain. The one-shot hook now installs buffer-locally in the compilation buffer, same shape as the projectile cache-revert hooks. - test-runner: outside a project with no global test directory, three commands crashed with wrong-type-argument on a nil path. Discovery now returns nil and the commands signal user-error. - diff-config: removed the global "-w" ediff default, which made every session ignore whitespace (indentation-only changes compared as identical). Whitespace-ignore stays available as ediff's per-session toggle. - restclient-config: the C-; R bindings went through raw global-set-key, silently depending on keybindings.el loading first. They now use a prefix keymap registered like the other C-; prefixes. - httpd-config: simple-httpd loaded on a 1s timer and created www/ on every startup. It now defers until impatient-mode needs it, and the doc root is created at package load.
* fix(prog): cover classic modes and warn for missing dev toolsCraig Jennings2 days4-0/+192
| | | | | | Classic go-mode and js-mode buffers got none of the ts-mode setup, and web-mode got the format key without the promised company/flyspell/LSP. All three now run the shared setup. The web-mode LSP attach guards on the HTML language server, so machines without it stay silent instead of prompting. gopls, clangd, clang-format, bash-language-server, shfmt, and shellcheck now warn at load when missing. The shfmt, shellcheck, and clang-format blocks gate on :if, which evaluates once at startup, so an absent tool silently disabled that setup until the next restart. I also put ~/go/bin on exec-path at load so the gopls check doesn't misreport a gopls installed there.
* refactor(media): extract the playback sentinel as a named builderCraig Jennings2 days1-0/+34
| | | | | - cj/media--play-sentinel returns the per-process closure. - Three new tests pin the reap-on-exit behavior.
* refactor: launch external processes with argv lists, not shellsCraig Jennings2 days4-26/+206
| | | | | | | | - open-this-file-with splits the typed command and calls call-process. - media-play-it resolves streams via a yt-dlp capture, then start-process. - Paths, URLs, and player args never meet a shell. - yt-dlp stderr is captured separately so warnings can't parse as URLs. - Stream resolution now blocks briefly. mpv (the default) is unaffected.
* test(ai-term): close the show-or-create subprocess mock holeCraig Jennings2 days1-3/+16
| | | | | | - The preserve-window test now mocks the tmux and color seams. - A recording process-file guard asserts nothing escapes. - The tmux helper's error handler would swallow a signaling guard.
* feat(music): add a delete-playlist commandCraig Jennings2 days1-0/+135
| | | | | | | - D in the playlist buffer deletes a saved playlist. - Candidates span both m3u sources: local library and MPD dir. - A typed yes/no confirms deletion. - Deleting the loaded playlist's file clears its association.
* feat(completion): right-align custom category annotationsCraig Jennings2 days3-21/+102
| | | | marginalia-align has been right for months, but annotations from the custom completion categories (radio stations, music files, and everything built through the system-lib table helpers) never went through marginalia. They rendered unaligned. A registration helper adds a builtin registry entry per category at table construction, which routes the table's own annotation function through marginalia's aligned field. The radio table converts from an affixation function with hand-rolled padding to a plain annotation, since marginalia now owns the alignment. Self-maintaining: any future custom category built through the helpers registers itself.
* feat(music): freeze the playlist header while the track list scrollsCraig Jennings2 days1-0/+50
| | | | The header block (playlist name, now-playing hero, key legend) is an overlay string anchored at buffer position 1, so scrolling the list carried it off the top, key legend included. A handler on the buffer-local window-scroll-functions re-anchors the overlay at the window's display start on every scroll, so the block stays pinned at the top of the window. The header refresh timer now anchors at the same position instead of the buffer top, so the once-a-second update can't yank a scrolled header back.
* fix(music): unstick arrows and number placement at the playlist topCraig Jennings2 days1-0/+27
| | | | | | The playlist header is a multi-line overlay string anchored at buffer position 1. With point on the top row, next-line's visual motion stepped through the header's screen lines. Those all map back to position 1, so arrows never moved point. The buffer now moves by logical lines (each row is one), which skips the header display entirely. The same shared anchor put row 1's number above the header instead of beside its track: both overlay strings sit at position 1 and the number rendered first. Number overlays now outrank the header's priority, so the number lands next to its own row.
* feat(music): mark the current playlist row on its numberCraig Jennings2 days1-0/+55
| | | | Emacs draws the filled cursor only in the selected window, and the playlist dock is glanced at from other windows constantly. The pinned cursor was invisible exactly when it was wanted. The current row's number now renders in inverse video, updated as point moves and re-applied after each renumber. The mark shows whether or not the window has focus, and the row band from hl-line was already sticky.
* fix(music): raise the playlist dock default to half the frameCraig Jennings2 days1-3/+4
|
* fix(music): show the cursor on the row number and open the dock tallerCraig Jennings2 days2-0/+49
| | | | | | With point pinned at the row start, redisplay drew the cursor after the number's before-string, on the album-art thumbnail, where a block cursor is invisible. A cursor property on the number string makes redisplay draw it on the number. The dock also kept reopening too short: its height memory remembered whatever size the window had at toggle-off, including squeezes from window churn. The squeezed fraction then overrode the default on every later open. The default rises to a third of the frame, and the toggle discards captured heights below it (a deliberate enlargement still sticks for the session).
* feat(music): pin the playlist cursor to the number gutterCraig Jennings2 days1-0/+78
| | | | Vertical motion over thumbnail rows and the stretch-space that right-aligns the metadata drifts point to arbitrary visual columns, usually line end. The rows aren't editable text, so the cursor now lives at the row start (the number column). A buffer-local post-command snap sends every landing back there. Kill, shift (C-up/C-down), and play already act on the whole row, so all track operations happen from the number. An active isearch keeps point until it ends, then the snap lands on the match's row.
* feat(music): playing-aware playlist landing and music-only addsCraig Jennings2 days5-14/+272
| | | | | | Opening the playlist used to jump to EMMS's selected track, which stays set while stopped, so the view opened deep in the list with point mid-row. It now lands on the playing track's row (beginning of line, upper third of the window) when a song is playing, and at the top of the list when stopped. Both entry points share the logic, and the playlist buffer gets hl-line so the current row stays findable on album art. Also fixed: directory adds handed the raw tree to emms-add-directory-tree, which adds every file it finds. Cover art and liner notes became playlist rows. All three add paths now route through a filtered walk that keeps only accepted music extensions. The m3u loader applies the same filter to local paths (stream URLs pass through), so old playlists with saved cover lines stop re-importing them.
* feat(music): tag completion, aligned listings, numbered playlist rowsCraig Jennings2 days3-0/+228
| | | | | | | | | | The radio tag search now completes over popular tags from radio-browser's /json/tags endpoint (station-count order, capped at 500, cached per session), so the prompt offers real tags instead of a blind guess. Free-form input still works, and a failed fetch degrades to plain input. Station listings align into columns: the votes field pads to a fixed width, and each annotation pads out to the widest candidate name. Playlist rows carry a numeric overlay prefix, rebuilt after every change by a debounced after-change hook, so the cursor stays visible on cover-art thumbnails and each row's position is readable. Overlays leave the buffer text to EMMS. Also fixed: the search now trims queries before they hit the API (a trailing space used to reach it as %20 and match nothing).
* fix(ai-term): key teardown session names off the buffer nameCraig Jennings2 days3-1/+52
| | | | ghostel retargets default-directory via OSC 7 on every cd in the agent shell, so close (and quit with no project argument) computed the wrong aiv- session name after a cd. The kill then missed the real session and orphaned the agent, or hit a different project's session. The buffer name ("agent [basename]") never changes, so teardown now derives the basename from it.
* fix(calendar-sync): honor BYDAY rules and drop cancelled eventsCraig Jennings2 days8-0/+345
| | | | | | | | The expander ignored BYDAY on monthly and yearly rules and stepped DTSTART's day-of-month instead, so a "2nd Wednesday" series rendered on the 12th of every month, the wrong weekday most months. It now resolves nth-weekday entries (2WE, -1TU), bare weekdays with BYSETPOS, and yearly BYMONTH+BYDAY, so each occurrence lands on the day the rule names. Nothing read the VEVENT STATUS property, so cancelled events rendered as normal meetings: a cancelled instance of a series reappeared at its original time, and standalone cancelled events stayed on the agenda. parse-event now drops STATUS:CANCELLED events, which also kills cancelled series masters. A cancelled RECURRENCE-ID override removes its occurrence instead of overriding it. The fixes are coupled: until BYDAY generates the right dates, a cancelled override can't match the occurrence it removes.
* test: assert recurring-events window against calendar-sync's own rangeCraig Jennings3 days1-7/+14
| | | | | | The rolling-window integration test hand-rolled its bound as now minus 90 days to now plus 365 days at the current clock time. The code's window is minus-3 / plus-12 calendar months at day granularity. So a boundary occurrence stamped at midnight sat inside the code's window but before the now-minus-90-days bound, and the test passed or failed by the day it ran (green 2026-07-16, red 2026-07-17). I switched the assertion to calendar-sync--get-date-range, so the test checks the invariant it names: every emitted occurrence lands within the window the pipeline computed, stable on any date.
* fix(test): stop silently skipping every integration testCraig Jennings4 days3-36/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INTEGRATION_TESTS globbed test-integration-%.el through $(wildcard ...), which takes a shell glob where % is a literal character, not a pattern. It expanded to nothing, so test-all skipped the integration phase and still printed "All tests complete". Fourteen files never ran, for as long as the variable has existed. The % is right one line up, because filter-out does take make patterns. The glob is now test-integration-*.el, and the counts add up: 597 unit + 14 integration = the 611 test files on disk. Turning the gate on surfaced five failures, none of them in production code. Four were rotting fixtures. parse-ics drops events outside a rolling window of today minus calendar-sync-past-months to plus future-months, and four tests fed it dates pinned to November 2025 or February 2026. They passed when written and began failing once the window slid past them. Their neighbours survived for two reasons: some hand their fixture to parse-event, which applies no window, and the weekly ones use unbounded RRULEs that keep generating into the window however old the DTSTART is. The fixtures now build dates relative to now, which is what the timezone file's own helper already did. The fifth was a real regression, caught five months late. The recording toggle test asserted on a fixture device and got whatever hardware is plugged into the developer's machine. cj/recording-get-devices runs --validate-system-audio, which shells to pactl, finds the fixture device isn't a real source, and auto-fixes the configured device to the default sink's monitor. The test mocked start-process-shell-command but not shell-command-to-string, so validation reached the real machine. It passes at 5bdd3420~1 and fails at 5bdd3420, the commit that added that validation in February. I faked pactl at the shell boundary rather than stubbing --validate-system-audio out, so the validation logic still runs, against a fixture machine.
* fix(calendar-sync): render multi-day events as org rangesCraig Jennings4 days1-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | format-timestamp built its date from the start and took only the hour and minute from the end, so the end date was thrown away. A conference running Jul 20 09:00 to Jul 23 17:00 produced <2026-07-20 Mon 09:00-17:00>, byte for byte the same timestamp as a same-day meeting, and the agenda showed it on the first day only. All-day spans collapsed the same way, to a bare <2026-07-20 Mon>. An event whose last day is later than its start now renders as an org range, <start>--<end>, which org parses as an active-range and shows on every day it covers. DTEND is the non-inclusive end of the event (RFC 5545 3.6.1), so an all-day event's last day is DTEND-1. Getting that backwards would have been worse than the bug: a one-day all-day event carries DTEND = start+1, so a naive range would turn every single all-day event into a two-day one. The decrement only applies when both ends are date-only. A date-only start with a timed end is malformed, and treating it as all-day would put the last day before the start and emit a backwards range. That case falls through to the same-day form, as before. I split out format-stamp and format-hhmm so both halves of a range and the compact same-day form build from one place. Same-day events are unchanged, pinned by two tests: the compact HH:MM-HH:MM form, and a single all-day event staying a single stamp. One unrelated bug stays open. A timed event with no DTEND renders as <date> and drops its time, so a 09:00 meeting reads as all-day. I left it alone.
* fix(calendar-sync): keep the final occurrence of an UNTIL-bounded seriesCraig Jennings4 days3-6/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC 5545 3.3.10 bounds a recurrence inclusively: when UNTIL lines up with the recurrence, that date is the last instance. The expansion loops guarded on calendar-sync--before-date-p, a strict comparison, so the instance landing exactly on UNTIL was dropped. Every bounded series silently lost its last meeting from the agenda. A series whose UNTIL equals its start date lost the only instance it had and vanished. I added calendar-sync--date-on-or-before-p beside --before-date-p and swapped the three UNTIL sites: the simple-recurrence loop feeding daily, monthly and yearly, plus both weekly checks. --before-date-p is unchanged, since a date is still not before itself. The two UNTIL property tests asserted the wrong invariant. They required every occurrence to fall strictly before UNTIL, the exclusive reading the RFC contradicts, so they pinned the defect they should have caught. The property is now on-or-before. An upper bound alone can't catch a dropped occurrence, so I added one asserting the series reaches its UNTIL date. Reverting the fix failed three daily tests and one property test, and no weekly ones. The weekly loop was fixed but unguarded, so it has its own test now. The comparison stays date-granular, matching --date-to-time. An UNTIL carrying a time of day earlier than the event's start will include that final instance where the RFC would exclude it. Making it datetime-precise means reworking --date-to-time and the timezone conversions feeding it, a much larger change than this bug warrants.
* fix(org-agenda): hoist cj/timeformat out of the defun it was buried inCraig Jennings4 days1-0/+84
| | | | | | | | | | | | | | | | | | cj/timeformat was defvar'd inside cj/add-timestamp-to-org-entry, so the symbol wasn't special until the command had run once. Until then a let around the call bound it lexically and never reached the function. I moved it to top level with a docstring. It has no other callers. The nested defvar also poisons tests. ERT runs alphabetically, so an earlier test that calls the command makes the symbol special retroactively. A later special-variable-p check then passes on test ordering rather than on the code, reading green in a full-file run and red in isolation. The new guard snapshots special-variable-p into a defconst at load, before any test body runs. I filled in the missing coverage: point and the following line survive the insert, empty and unicode time strings, an empty buffer, and a read-only buffer signalling rather than dropping the stamp. The empty-string case pins a trailing space (current behavior, characterized rather than changed).
* fix(recording): delete the stub .mkv a failed video start leavesCraig Jennings7 days1-0/+152
| | | | | | | | - A failed wf-recorder start still writes a ~0.5s stub .mkv. - Stubs littered the recordings directory and matched *.mkv globs downstream. - The start path now stamps the output path on the process. - The sentinel's failed-start branch deletes that file. - User stops and real recordings never trigger the delete.
* refactor(signal): retire the in-Emacs signel client to the archiveCraig Jennings7 days8-958/+11
| | | | Agents drive Signal via signal-cli and signal-mcp, so the interactive client earns no keep. I moved signal-config.el and its seven test files to archive/ per the pasture convention, dropped the require from init.el, removed the dashboard's Signal launcher (row sizes now 5 4 3 2, tests updated), and unregistered the C-; M prefix from the running daemon. The ~/code/signel fork repo is untouched. The spec record stays IMPLEMENTED with a retirement history line, and the messenger-unification draft carries a premise-shift note.
* fix(prog-python): keep the pyright guard authoritative for LSP attachCraig Jennings7 days1-0/+64
| | | | | | lsp-pyright's :hook lambda called require and lsp-deferred unguarded on every python-ts buffer, so a machine without pyright still got the LSP attach prompt that cj/python-setup's guard exists to prevent. The guarded branch now owns the require and the attach, and the hook is gone. Classic python-mode now runs the same setup hooks as python-ts-mode, so treesit-auto's grammar-unavailable fallback keeps indentation, keys, and LSP. Four tests cover the guard branches and pin that every python hook entry stays a named function.
* fix(slack): harden notifications like signel'sCraig Jennings7 days1-0/+113
| | | | | | cj/slack-notify passed raw message bodies to a bare start-process. A multiline message made a giant toast, and a machine without the notify script errored inside the condition-case, so the notification silently vanished. It now routes through the same shape signel uses: whitespace collapsed and the body truncated at 120 chars, sound gated by a new cj/slack-notify-sound defcustom (silent by default), and a notifications-notify fallback when the script is absent. The fallback requires notifications.el first, which isn't autoloaded. cj/slack-test-notify exercises the same delivery path. The shared cj/messenger-notify extraction that collapses the signel and slack copies stays with the messenger-unification task. Ten tests cover the formatter, the delivery routing, and the DM/mention predicate wiring the audit called untested.
* fix(signal): honor the cache-clear promise and mark empty fetches warmCraig Jennings7 days2-4/+68
| | | | | | | | Two picker-cache bugs from the config audit, verified against current code first. The cache docstring promised clearing on signel-stop, but nothing cleared it, so a stale contact list survived a relink or reconnect. I advised a named clear function :after signel-stop, which makes the docstring true. An empty listContacts result cached nil, indistinguishable from a cold cache, so a zero-contact account re-ran the picker's blocking fetch (up to the 3s timeout) on every open. The fetch now caches an empty sentinel and the picker reads through cj/signel--cached-contacts. One existing test pinned the nil behavior and now asserts the sentinel instead.
* feat(ai-term): pick the agent runtime at session launchCraig Jennings7 days1-0/+136
| | | | | | | | | | A fresh agent session now asks which runtime to run: claude, codex, or any local ollama model via codex --oss. RET keeps claude, so the common launch stays Enter-Enter. Reattaches and redisplays never ask. The picker fires only when neither a live agent buffer nor a surviving tmux session exists. I mirrored the runtime names and launch strings from the bin/ai launcher so the two stay one mental model, and the choice list itself comes from "ai --print-runtimes" when that launcher is installed, reusing its live ollama scan and dead-server timeout. A static claude-first list stands in without it. The explicit --local-provider=ollama flag is deliberate: configuring the provider through config.toml silently does nothing. The chosen command threads through show-or-create into the tmux launch line. On reattach, tmux new-session -A ignores it, so no reattach path changes behavior. cj/ai-term-agent-command keeps its meaning as the claude runtime's full line. Thirteen tests cover the runtime-to-command map, the print-runtimes parsing, the launcher fallback, and the launch-command override.
* fix(mu4e-attachments): reject stale MIME handles at save timeCraig Jennings7 days1-0/+50
| | | | | | The selection buffer captures MIME handles when it opens, but viewing another message kills the buffer a handle points at. Saving through such a handle died deep in mm-decode, or could write another message's bytes. The save path now signals a user-error naming the attachment when its handle's buffer is dead, and it checks before any mu4e MIME support loads, in the same spot as the existing no-handle check. I added tests for the stale-handle error, the healthy live-handle save, and the mid-batch failure behavior (the error propagates and files already written stay).
* fix(mail): repair account nav, send fallback, and reply handlingCraig Jennings7 days2-2/+37
| | | | | | | | | | | | | | Seven config-audit findings in mail-config, each verified against the installed mu4e 1.14 source before changing anything: - The C-; e account nav commands now require mu4e before searching. The maps register eagerly at startup, but mu4e-search has no autoload cookie, so a nav key pressed before mu4e's first launch signaled void-function. - With msmtp absent, both send variables now get cj/mail--send-mail-unavailable, which signals a user-error naming msmtp. The old fallback left message-send-mail-function nil (the top-level defvar pre-empts message.el's default), so the first send died with "invalid function: nil". - I removed the unconditional org-msg-edit-mode advice on the two reply commands. org-msg-post-setup already runs on mu4e-compose-mode-hook and applies org-msg-default-alternatives itself, so the advice forced org-msg onto text-only replies and re-ran a major mode org-msg had already set up. - I dropped the save-attachment headers action: mu4e-view-save-attachments takes no message argument and reads MIME parts from the view buffer, so it never worked from headers. - I deleted the obsolete HTML view knobs (mu4e-view-prefer-html and both mu4e-html2text-command sets): the shr-based view has ignored them since mu4e 1.7. - I reordered the contexts so cjennings.net comes first: with pick-first, gmail-first made gmail the silent default account for the first compose. - I dropped mu4e-starred-folder (not a mu4e variable, never had an effect) and the obsolete mu4e-maildir alias. New tests cover the nav-command mu4e load and the msmtp-absent fallback.
* test(org-capture): cover the popup neutralize guardsCraig Jennings7 days1-0/+136
| | | | | | The guards from the previous commit landed without tests. I added ten: eviction of a stray live buffer to *scratch*, capture UI spared (*Org Select*, CAPTURE-*), idempotence on a window already showing *scratch*, non-popup frames untouched, nil and non-frame inputs ignored, both hook wrappers' dispatch, and hook registration. The tests drive the real batch frame instead of mocking frame primitives: they rename it to "org-capture", exercise the guard, and revert to auto-naming. The revert must be nil, not the saved name, because Emacs refuses to set F<num>-shaped names explicitly. window-buffer-change-functions only runs during redisplay, so the module's own hook can't fire mid-test in batch.
* feat(eat-config): answer XTWINOPS queries so tmux renders sixel in EATCraig Jennings7 days1-0/+120
| | | | | | | | tmux 3.7b won't emit sixel until it learns the client's cell pixel size via CSI 14/16/18 t. EAT 0.9.4's parser has no CSI t clause and drops the queries, so images never render. I added a :before advice on eat--t-handle-output that scans the raw output and answers through the terminal's own input function (eat--t-with-env binds eat--t-term). I verified it live: images render and survive window switches, scrolling, and resizing. I guarded the advice-add so it installs only while EAT itself can't answer. Two answerers give tmux a double reply, and it forwards the second one's raw bytes into the pane as keystrokes. The guard keys on eat--t-send-window-size-report, the function an upstream clause would define. I kept an upstream-shaped parser-clause patch locally for a PR to akib/emacs-eat.
* bug: fixing exdate lines and adding testsCraig Jennings7 days1-0/+29
|
* fix(org-drill-config): fall back to :vc when the dev checkout is absentCraig Jennings9 days1-0/+31
| | | | org-drill-config hard-coded :load-path to ~/code/org-drill with :demand t, so on a machine without that checkout org-drill failed to load and drill broke. cj/--org-drill-source-keywords now picks the source at load time: :load-path when the checkout exists, a :vc install otherwise. The keyword is spliced through eval, since use-package needs a literal at macro-expansion.
* refactor(calendar-sync-source): drop dead fetch variant, test the sentinelCraig Jennings9 days1-0/+72
| | | | The buffer-string calendar-sync--fetch-ics had no callers. The sync path uses the temp-file variant exclusively, so 30 lines of curl and sentinel logic that would only drift are gone. I also pulled the fetch-ics-file sentinel's finish logic into calendar-sync--fetch-sentinel-finish so its success, failure, and temp-file-cleanup branches can be tested without a live curl process. The async-worker tests stub the whole fetch and never reached them.
* fix(org-contacts-config): jump to contact heading, not a body matchCraig Jennings9 days1-0/+72
| | | | cj/org-contacts-find visited the contacts file before prompting, so a C-g at the prompt stranded point at the top of it. It then jumped with search-forward, which could land inside another entry's body that mentioned the name. I collect the headings with find-file-noselect first (extracted as cj/--org-contacts-collect), prompt, then jump to the selected heading's stored position. The prompt now requires a match, since a typed non-match has no position to jump to.
* fix(org-reveal-config): register presentation keys via prefix mapCraig Jennings9 days1-0/+38
| | | | The seven presentation commands were bound with raw global-set-key on "C-; p ..." chains. That only works once keybindings.el has made "C-;" a live prefix. Otherwise each binding errors with "non-prefix key". I replaced them with cj/reveal-map registered under "C-; p" via cj/register-prefix-map, matching every sibling and dropping the load-order dependency.
* fix(flyspell-and-abbrev): stop re-scanning the whole buffer on every C-'Craig Jennings9 days1-0/+22
| | | | cj/flyspell-then-abbrev ran a bare flyspell-buffer guarded by (unless flyspell-mode ...), but nothing turned flyspell-mode on, so the guard never tripped. Every C-' press re-scanned the whole buffer, which is O(buffer) per keypress in large files. I routed the scan through cj/flyspell-on-for-buffer-type instead, so the mode sticks after the first press and the buffer is scanned once.