aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fix(ai-term): stop F9 toggle shrinking the agent window each cycleCraig Jennings7 days8-60/+93
| | | | | | | | | | | | | | | | | 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.
* chore(todo): mark the 5 medium refactor extractions done, 8 items remainCraig Jennings7 days1-22/+11
|
* refactor(custom-case): extract per-word title-case decisionCraig Jennings7 days1-61/+59
| | | | | | | | | Lift the three-branch capitalize-this-word predicate out of cj/title-case-region into cj/--title-case-capitalize-word-p; the command now loops word boundaries and delegates the decision, dropping its cyclomatic complexity. The 32-test characterization suite is unchanged and green. The function is reindented from tabs to the 2-space house style in the same pass, which accounts for the line churn; no behavior change.
* refactor(dirvish): extract playlist-target resolution from the create commandCraig Jennings7 days2-21/+85
| | | | | | | 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 Jennings7 days2-41/+107
| | | | | | | 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(ai-term): extract toggle-off teardown and working-buffer swapCraig Jennings7 days1-53/+61
| | | | | | | Lift the F9 toggle-off branch (~50 lines) out of cj/ai-term into cj/--ai-term-toggle-off, leaving the pcase arm a one-liner. Fold the three copies of the most-recent-non-agent-buffer swap idiom (two in the toggle-off cases, one in cj/--ai-term-close-buffer) into cj/--ai-term-swap-to-working-buffer.
* refactor(calibredb-epub): extract nov re-render and centering helpersCraig Jennings7 days1-18/+31
| | | | | | | Lift the render-preserving-position block and the margin/fringe block out of cj/nov-update-layout into cj/nov--rerender-preserving-position and cj/nov--center-in-window, dropping its nesting. Fold the thrice-repeated #E8DCC0 sepia literal in cj/nov-apply-preferences into one local binding.
* chore(theme-studio): restyle WIP orderless-match facesCraig Jennings7 days2-12/+16
| | | | New foregrounds plus italic slant on orderless-match-face-0..3; source flips default to user.
* chore(todo): file parent task for the remaining refactoring batchCraig Jennings7 days1-0/+124
|
* refactor(elfeed): extract HTML-entity decoder, drop leftover DEBUG loggingCraig Jennings7 days2-18/+43
| | | | 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, & 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.
* refactor(prog-webdev): use the shared format-region helperCraig Jennings7 days1-26/+1
| | | | prog-webdev carried cj/--webdev-format-region, a third byte-identical copy of the format-region helper already extracted to system-lib in the prog-json/prog-yaml dedup. Drop it and call cj/format-region-with-program (system-lib is already required). Behavior unchanged; the existing format tests cover it.
* refactor(prog-general): dedup the deadgrep search tail, lift its helpersCraig Jennings7 days2-13/+65
| | | | cj/deadgrep-here and cj/deadgrep-in-dir repeated the same normalize-directory + read-term + invoke-deadgrep tail. Lift cj/deadgrep--initial-term out of :config and add cj/--deadgrep-run for the shared tail; each command resolves its root then delegates. Adds coverage for the term seeding and the run helper.
* refactor(prog-general): lift cj/find-project-root-file out of :configCraig Jennings7 days2-14/+62
| | | | The pure project-root file finder lived inside the projectile use-package :config, so it was unreachable under make test. Move it to top level (its forward declaration already existed); cj/open-project-root-todo and cj/project-switch-actions still call it. Adds unit coverage for string regexps, rx forms, no-match, and no-project.
* refactor(font-config): lift frame/icon helpers out of :configCraig Jennings7 days2-36/+114
| | | | cj/apply-font-settings-to-frame, cj/cleanup-frame-list (inside with-eval-after-load 'fontaine) and cj/maybe-install-all-the-icons-fonts (inside all-the-icons :config) carried real branching but were unreachable under make test. Move all three (and the cj/fontaine-configured-frames state) to top level; the :config/eval-after-load blocks keep only the hook wiring. Adds declare-function for the package calls and coverage of the apply/cleanup/install branches.
* refactor(erc): lift cj/erc-generate-buffer-name out of :configCraig Jennings7 days2-9/+40
| | | | The buffer-name function lived inside the erc use-package :config, so it was unreachable under make test (no package-initialize). Move it to top level; :config keeps the erc-generate-buffer-name-function setq. Adds unit coverage for the server-and-channel, server-only, and missing-piece cases.
* refactor(mousetrap): extract per-category event-binding loopCraig Jennings7 days2-16/+61
| | | | mouse-trap--build-keymap-1 nested its event-binding cond/dolists five deep. Extract mouse-trap--bind-events-to-ignore (spec prefixes map); build-keymap-1 now just walks the categories and delegates the binding. Adds coverage for the wheel and click-event paths.
* refactor(chrono-tools): extract tmr sound-file helpers, flatten the commandCraig Jennings7 days2-15/+73
| | | | cj/tmr-select-sound-file nested cond/let five deep, mixing the current-sound lookup, the completing-read, the setq, and the message. Extract cj/tmr--current-sound-name and cj/tmr--apply-sound-file (the testable parts) and flatten the inner conds to ifs. The command keeps the prefix-arg/no-dir/no-files guards and the prompt. Adds coverage for both helpers.
* refactor(jumper): extract marker-traversal and location-candidates helpersCraig Jennings7 days2-32/+93
| | | | jumper--location-exists-p and jumper--format-location both opened a marker with the same save-current-buffer/set-buffer/save-excursion/goto-char dance; jumper-jump-to-location and jumper-remove-location shared a verbatim candidate-list cl-loop. Extract jumper--with-marker-at (index fn) and jumper--location-candidates; the four callers delegate. Adds direct coverage of the candidate list.
* refactor(modeline): extract the clickable-segment keymap builderCraig Jennings7 days2-11/+42
| | | | The buffer-name, vc, and major-mode segments each hand-rolled the same make-sparse-keymap + define-key [mode-line mouse-1/3] construction. Extract cj/--modeline-click-map (mouse-1 &optional mouse-3); the three segments call it. Adds coverage for the one- and two-button cases.
* refactor(ai-config): extract gptel model-apply step, drop dead branchCraig Jennings7 days2-8/+61
| | | | cj/gptel-change-model applied the selection inline (scope dispatch + message) and re-checked (stringp model) on a value already interned to a symbol. Extract cj/--gptel-apply-model-selection (scope backend model backend-name), which sets the vars globally or buffer-locally and returns the message; the dead stringp branch is gone. Adds direct coverage of both scopes.
* refactor(ai-conversations): reuse the autosave-active predicate in the hooksCraig Jennings7 days1-8/+2
| | | | cj/gptel--autosave-after-send and cj/gptel--autosave-after-response re-inlined the four-clause "should we autosave?" boolean that cj/gptel--autosave-active-p already encapsulates. Call the helper instead (after-send keeps its extra autosave-on-send flag). Behavior unchanged; one predicate to maintain.
* refactor(org-agenda): extract the agenda base-file listCraig Jennings7 days2-5/+46
| | | | The fixed base list (inbox, schedule, and the three calendars) was spelled out as a literal in cj/--org-agenda-scan-files, cj/todo-list-single-project, and the chime initializer. Extract cj/--org-agenda-base-files so adding a calendar source is a one-place change; the single-project view prepends its todo.org with cons. Adds a test for the helper's contents and order.
* refactor(mail-config): build the account-nav keymaps from one templateCraig Jennings7 days2-18/+87
| | | | The cmail/dmail/gmail navigation maps were three near-identical defvar-keymap blocks differing only by maildir prefix, with the unread/flagged/large query clauses repeated in each. Add cj/--mail-account-search-queries (account -> the four search strings) and cj/--mail-make-account-map (builds the keymap), wrapped in eval-and-compile so org-msg's :preface can call the builder during byte-compilation. The three maps become one-line builder calls. Adds direct coverage of the query strings and the per-account closures.
* refactor(org-capture): extract the find-or-create-top-heading blockCraig Jennings7 days2-25/+69
| | | | cj/org-capture--goto-file-headline, cj/--org-capture-goto-open-work, and cj/--org-capture-goto-exact-headline each repeated the same positioning block: search from point-min, jump to the heading on a match, else append it at end of buffer and back up. Extract cj/--org-find-or-create-top-heading taking the search regexp and the heading line; the three sites delegate. Behavior unchanged; adds direct coverage of the helper with a plain regexp.
* docs(custom-ordering): correct point-position note on replace-region helperCraig Jennings7 days1-1/+1
|
* refactor(custom-text-enclose): extract the region-or-word dispatchCraig Jennings7 days2-48/+92
| | | | cj/surround/wrap/unwrap-word-or-region each repeated the same skeleton: target the active region, else the word at point, else show a message; then delete and re-insert the transformed text. Extract cj/--enclose-region-or-word, which takes the transform as a function and the no-target message, so each command reads its prompts then delegates. Behavior and messages unchanged; adds direct coverage of the dispatch helper.
* refactor(custom-datetime): generate the six inserters from one macroCraig Jennings7 days2-33/+42
| | | | The six cj/insert-* commands were identical except their format variable and a one-word docstring noun. Replace them with a cj/--define-datetime-inserter macro and six table-style calls; the format defvars and the keymap are unchanged. Adds a test asserting all six stay interactive commands.
* refactor(custom-ordering): dedupe region guard, replace tail, and ↵Craig Jennings7 days2-56/+98
| | | | | | arrayify-python Extract cj/--ordering-validate-region (the start>end guard copy-pasted across all seven pure helpers) and cj/--ordering-replace-region (the delete-region + insert tail repeated in every interactive command). Alias cj/arrayify-python to cj/arrayify-json, which it duplicated verbatim, leaving both keybindable. Behavior unchanged; adds direct Normal/Boundary/Error coverage for the two new helpers.
* refactor: extract shared format-region helper into system-libCraig Jennings7 days4-54/+100
| | | | prog-json and prog-yaml each carried a byte-identical cj/--<lang>-format-region that runs a formatter over the buffer via call-process-region and replaces it on exit 0. Hoist it to system-lib as cj/format-region-with-program with a generic output buffer, and point both formatters at it. Adds the first direct unit coverage of the helper (Normal, Boundary, Error).
* refactor: remove dead wrappers and commented-out blocksCraig Jennings7 days8-74/+1
| | | | Drop cj/apply-browser-choice (browser-config) and cj/load-fallback-theme (ui-theme), orphaned wrappers with no caller that just duplicated logic the live paths already inline, plus their tests. Delete commented-out blocks: a duplicate contact capture template (org-contacts-config), a disabled personal-info-dir :init (help-config), a stale TODO setq (org-config), and an old commented regex (test-runner).
* chore(todo): mark window pull-away manual check passedCraig Jennings7 days1-8/+0
|
* fix(windows): shrink the pull-away reveal to the minimum window heightCraig Jennings7 days2-2/+7
| | | | minimize-window floors at window-min-height (4 lines), leaving roughly a 10% reveal. Bind window-min-height to 1 around it so the reveal opens at the ~2-line floor and the current window keeps almost the whole frame before the windsize arrows take over.
* chore(todo): update window pull-away notes to shipped behaviorCraig Jennings7 days1-5/+6
|
* fix(windows): keep the pulled-away window on the arrow's edgeCraig Jennings7 days2-35/+45
| | | | The sole-window pull split toward the arrow at 50/50, so a fullscreen terminal jumped above the revealed buffer at half height. Now the reveal opens on the opposite side and is minimized to a sliver, so the current window keeps the arrow's edge near-full and the sticky windsize arrows shrink it step by step, matching the feel of resizing an existing split.
* chore(todo): close dirvish and window-pull tasks, file manual checksCraig Jennings8 days1-12/+19
|
* feat(windows): pull a window away from a sole window with C-; b + arrowCraig Jennings8 days2-8/+69
| | | | When the selected window fills the frame there is no divider to resize, so the arrow now splits toward its direction with the previous buffer and the original window shrinks from that edge. Multi-window resize is unchanged.
* feat(dirvish): bind d to duplicate, D to guarded force-deleteCraig Jennings8 days2-2/+80
| | | | Drop delete-to-trash. d now duplicates the file at point. D force-deletes the marked files via sudo rm -rf behind a yes-or-no-p that names the targets, and reports success only when rm exits 0.
* chore(todo): stamp task-review on 7 audit-filed tasksCraig Jennings8 days1-0/+21
|
* chore(todo): archive resolved org-lint follow-upsCraig Jennings8 days1-4/+3
|
* chore(theme-studio): save WIP working stateCraig Jennings8 days2-75/+130
|
* chore(todo): log the shipped theme-studio task batchCraig Jennings8 days1-0/+12
| | | | Record the second studio batch as dated entries: expander hovers, view-dropdown lock indicator, expand/collapse-all, expander-stays-open-on-rebuild, 18 language previews, and the box column move.
* feat(theme-studio): move the box column between style and contrastCraig Jennings8 days4-26/+26
| | | | Box now sits at column 5 in all three tables, after style and before contrast, instead of last. The contrast and example/preview columns shift right by one, and the position-based gates follow.
* feat(theme-studio): add 18 language previewsCraig Jennings8 days4-2/+430
| | | | Add tokenized code samples for Racket, Scheme, Haskell, OCaml, Scala, Kotlin, Swift, Lua, Ruby, Perl, R, Erlang, SQL, PHP, Ada, Fortran, MATLAB, and Assembly, wired into the language dropdown. Each is an idiomatic snippet tagged by syntax category so the studio renders it in the assignment colors. A guard test checks every added language is registered and renders a non-trivial sample.
* fix(theme-studio): keep an expander open across a table rebuildCraig Jennings8 days3-10/+64
| | | | A package edit rebuilds the whole table, which collapsed any open expander under the user mid-edit. Track open rows in a module-level EXPANDED set, keyed by element/face, and reopen them on rebuild. Editing a value inside an open expander now leaves the row open. The expand-all/collapse-all and per-row toggles keep the set in sync.
* feat(theme-studio): expand/collapse-all toggle and disclosure trianglesCraig Jennings8 days4-18/+106
| | | | Each row's expander toggle now shows a disclosure triangle that tracks its state: a right triangle when collapsed, a down triangle when expanded (it was a static ellipsis). A header-level expand-all / collapse-all button per table opens or closes every row's detail at once and follows the aggregate state. The per-row triangles and the header button stay in sync across a table rebuild.
* feat(theme-studio): expander label hovers and a view-dropdown lock indicatorCraig Jennings8 days3-8/+108
| | | | Each label in the expander detail row now carries an explanatory hover (DETAIL_HOVERS), matching the table-header labels. The view dropdown prefixes a lock glyph on any view whose elements are all locked, recomputed on every lock change through updateLockToggles.
* fix(todo): repoint the broken signel link and close the org-lint follow-upsCraig Jennings8 days1-7/+5
| | | | The Signal task linked to a todo file in the old signel checkout, which no longer exists. I repointed it to the smoke project's todo (smoke is the evolved Signal package). I also reworded the bug-capture task's prose so its quoted TODO-heading strings stop tripping the misplaced-heading checker. A full org-lint pass now reports zero, so the follow-up task is closed.
* chore(todo): close shipped theme-studio widget tasksCraig Jennings8 days1-2/+11
| | | | Mark the reduce-width, custom weight/slant dropdown, language-dropdown, and lock-to-leftmost tasks done as dated log entries. Refresh the org-lint follow-up list (current line numbers, plus the broken signel-todo link).
* feat(theme-studio): move the lock column to the leftmost positionCraig Jennings8 days4-20/+20
| | | | Put the lock cell first in all three assignment tables, ahead of the element/face name. The lock and name columns swap, and every column from fg onward is unchanged. The element-name sort moves to column 1, and the sort and index gates follow it.
* feat(theme-studio): custom weight/slant dropdowns with previewsCraig Jennings8 days4-42/+128
| | | | | | Replace the native weight and slant selects with a custom dropdown themed like the color dropdown. The values are spelled out (semibold instead of "semi", and an unset control reads "weight"/"slant" rather than "wt"/"sl"), and each popup option renders in its own weight or slant so the choice previews itself. The trigger shows the current value in that style too. mkEnumDropdown mirrors the color dropdown's popup, lock, and outside-click handling, so the new control opens, locks, and closes the same way. The style-cluster gates drive the popup instead of a native select and check the spelled-out range plus the per-option preview.