| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
Three near-identical skeletons folded together: the simple divider becomes the
padded divider with zero text padding; the plain box and the heavy box share one
border/text/border emitter (cj/--comment-box-emit) with a HEAVY flag adding the
interior blank lines; and the repeated cmt-start/doubled-semicolon/space line
prologue becomes cj/--comment-emit-prefix. Output is byte-identical -- the
per-generator characterization suites stay green -- and the file drops ~65 lines.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| | |
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
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).
|
| |
|
|
| |
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).
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
| |
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.
|
| |
|
|
|
|
| |
The F9 agent always docked as a right-side column on a landscape frame. On this 138-column frame that left ~68-column panes, too cramped to read code and the agent side by side. The F12 terminal and F10 playlist hardcoded a bottom split with no width-aware path.
I added cj/preferred-dock-direction and the cj/window-dock-min-columns defcustom (default 80) to the window-geometry lib: dock side-by-side only when the narrower pane keeps at least the minimum width, otherwise stack below. All three toggles now route through it. F9 drops its pixel-aspect rule. F12 and F10 gain a right-column width default and become adaptive. F10 keeps width and height size memory in separate vars so a resize on one axis doesn't leak to the other.
|
| |
|
|
| |
The modeline colored the buffer name by write and modification state (red read-only, green modified, gold overwrite) through a classifier in user-constants.el. I removed it, the same way the matching cursor coloring was removed earlier for being more confusing than useful. The classifier had no other live user, so it and its two test files go with it. The buffer name now renders in the normal mode-line color.
|
| |
|
|
|
|
|
|
| |
ghostel 0.35.0-0.35.2 hard-crash the whole Emacs process when a terminal buffer is displayed. The native PTY path was reworked to spawn worker threads. On Linux/glibc a SIGSETXID handler then calls malloc while the main thread holds the arena lock, so opening an agent terminal takes the whole editor down (upstream #422, with #423 the macOS recursive-lock variant). Reproduced down to a plain M-x ghostel in a GUI frame, so it's not ai-term-specific.
Hold ghostel at the 0.33.0 build (ghostel-20260604.2049), which predates that rework. :ensure is satisfied by the installed 0.33.0 directory and won't upgrade it. The use-package block carries the rationale and a do-not-upgrade guard so it isn't bumped back into the crash before upstream ships a fix.
Also set ghostel-module-auto-install to download so the native module installs without the interactive prompt.
|
| |
|
|
| |
C-x 2 / C-x 3 already show the dashboard in the new window while point stays put. The one dead spot was splitting from the dashboard itself, which put the dashboard in both panes. Now the new window shows *scratch* when the current buffer is the dashboard, and the dashboard everywhere else. I pulled the choice into a pure predicate (cj/--split-from-dashboard-p) and a companion helper, both tested.
|
| |
|
|
| |
I dropped the buffer-local face remap that lightened the *scratch* background 5% above the theme default. Scratch now uses the plain theme background like every other buffer. The startup hook still moves the cursor to end-of-scratch. Only the tint call, its two helpers, the defcustom, the color require, and the now-orphaned test go.
|
| |
|
|
| |
C-; is GUI-only: terminals can't encode Control-semicolon, so the whole custom command family (calendar, AI, Slack, org, pearl, jump, and the rest) was unreachable in a terminal frame (emacs -nw, emacsclient -nw, or Emacs inside vterm/tmux). I bound the single cj/custom-keymap under C-c ; alongside C-;, so the same leaf keys reach the identical map in both GUI and TTY with no relearning and no per-module edits. C-c is the standard user prefix and always TTY-encodable. I audited every leaf key in the family and they're all TTY-safe (letters, digits, punctuation, SPC, and arrow keys), so nothing needed remapping.
|
| |
|
|
| |
mu4e paints its header lines, main menu, and view headers with manual `face' text properties. Global font-lock stripped them, so the buffers rendered unthemed, the same failure the dashboard hit. I extracted the dashboard's one-off exclusion into a shared, additive cj/exclude-from-global-font-lock helper in system-lib and repointed the dashboard to it. Then I excluded mu4e-headers-mode, mu4e-main-mode, and mu4e-view-mode. The view body renders through gnus's own washing rather than font-lock, so excluding it is safe.
|
| |
|
|
| |
I enabled dashboard-set-file-icons so the project, bookmark, and recent-file rows show nerd-icons file icons, colored per filetype. They render now that the dashboard is out of global font-lock, which was stripping the icon faces too. Bookmarks fall back to a generic icon since there's no filetype to map.
|
| |
|
|
|
|
| |
The dashboard banner title and section headings render in the default face instead of their theme colors. The faces are defined correctly. Global font-lock fontifies the dashboard buffer and strips the `face' text properties dashboard sets by hand: it owns `face' and clears props it didn't apply. Items and the navigator survive because their color rides a dashboard-items-face overlay, which font-lock leaves alone.
Excluding dashboard-mode from global font-lock keeps the banner and heading faces. I set it at top level so it applies regardless of the use-package body.
|
| |
|
|
|
|
| |
cj/gptel-switch-backend set gptel-model to the raw completing-read string. gptel's modeline code calls symbolp on gptel-model and signals wrong-type-argument on a string, which surfaces as a redisplay hang (reachable from C-; a B). The sibling command cj/gptel-change-model already interns. This one didn't.
I added a pure cj/gptel--model-to-symbol helper (mirroring cj/gptel--model-to-string) and route the model through it before the setq. The existing switch-backend test asserted the buggy string value. It now asserts a symbol plus an explicit symbolp guard.
|
| |
|
|
| |
A buffer-local face remap lightens the *scratch* default background by cj/scratch-background-lighten percent (default 5) so it reads as the scratch buffer, applied on emacs-startup-hook. The colour math is display-dependent (verified live); the pure helper's guard contract is unit-tested.
|
| |
|
|
| |
<next>/<prior> weren't bound in vertico-map, so in a long completing-read they fell through and selected-then-dismissed the list. Bind them to vertico-scroll-up / vertico-scroll-down.
|
| |
|
|
| |
The heavy-box empty and text lines began with a bare decoration char, so in line-comment languages (elisp, Python) C-; C h injected syntax-breaking lines. Prefix the interiors with the comment char and suffix them like cj/--comment-box does. Add the missing min-length guard so small or negative widths error cleanly instead of failing inside make-string. Updated the two characterization assertions to the corrected output.
|
| |
|
|
| |
dired-mark advances point itself, so the loop's extra forward-line skipped every other file (and could mark a directory). Use dired-get-filename + file-directory-p with an if/else: a marked file line advances once via dired-mark, non-file/directory lines advance manually. Replaces the regex line predicate (retired with its mock test) with a real-Dired marked-count test.
|