| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
F2 is now the universal preview key across modes. markdown-mode already binds F2 to markdown-preview. Org-mode now binds it to org-reveal instead of F5. A follow-up ticket reworks the rest of the F-key block to consolidate the dev-loop keys (compile+run, debug, test, coverage).
|
| |
|
|
| |
Several lines in the header were stale. The default preset is BerkeleyMono, not FiraCode, and the height is now machine-dependent (120 on laptops, 140 on desktops). The default preset's variable-pitch font is Lexend. Merriweather is only the fallback for unnamed presets. The fontaine preset keybinding is M-S-f, not M-F. The emoji bindings (C-c E i, C-c E l) weren't listed.
|
| |
|
|
|
|
|
|
| |
`env-laptop-p` treated any `battery-format "%B"` value that wasn't literally "N/A" as "has a battery." On a Linux desktop using `battery-upower`, the result is "unknown". The AC adapter and USB-C power entries exist in /sys but there's no BAT*. That made desktops look like laptops. The per-machine font height switch in `font-config.el` broke as a result.
The fix uses /sys/class/power_supply/BAT* as the canonical Linux signal. That's what the kernel exposes, and what upower itself reads. Other platforms keep the `battery-format` path, but the fallback now checks for a live battery status char ("!", "+", "-") instead of only excluding "N/A".
Two pure helpers (`env--battery-status-char-indicates-battery-p`, `env--power-supply-has-battery-p`) keep the logic testable. The new test file covers Normal, Boundary, and Error cases for each helper.
|
| |
|
|
|
|
| |
The default fontaine preset now picks its height based on `env-laptop-p`. Laptop: 120 (12pt). Desktop: 140 (14pt), matches foot's `size=14`. Text reads at the same size across Emacs and the terminal.
This reuses `env-laptop-p` from `host-environment.el` instead of adding a gitignored local override.
|
| |
|
|
|
|
|
|
| |
Two gaps in cj/hugo-preview surfaced during manual testing.
First, the browser opened one second after start-process returned. On any non-trivial site, Hugo takes several seconds to finish its initial build before it binds port 1313. The browser requested the page before the server existed and got ERR_CONNECTION_REFUSED. Replaced the fixed one-second run-at-time with a process filter that watches Hugo's output for "Web Server is available at" — the line Hugo prints once it has actually bound the port. The browser now opens at the right moment regardless of build time. The filter clears itself after firing so subsequent output does not re-open tabs.
Second, if Hugo exited on its own (for example a template error in the theme), the preview command went silent with no indication that anything was wrong. Added a process sentinel that clears cj/hugo--preview-process on any exit and prints "hugo server crashed (exit N) — see *hugo-server* buffer" when the exit status is non-zero. User-initiated stops arrive as signal status and remain silent because cj/hugo-preview already prints its own stop message.
|
| |
|
|
|
|
|
|
|
|
| |
Two small cleanups on hugo-config.el after the feature commits.
The file header listed only five bindings (n, e, o, O, d) and called the lowercase-d binding "Toggle draft." Both are now wrong. Replaced the listing with a pointer to the keybindings section at the bottom and to the which-key panel, which are the real sources of truth and do not rot.
The functions used to live under one generic "Hugo Blog Functions" header. Regrouped them by purpose: Post Creation, Post Export, Directory Navigation, Draft Management, Preview and Publish. Moved the two picker helpers (cj/hugo--post-metadata and cj/hugo--collect-drafts) into the Draft Management section. No behavior change.
All seven ERT tests still pass.
|
| |
|
|
|
|
|
|
| |
wip.el held commented-out scratch code (efrit, buffer-same-mode, easy-hugo) plus one active pomm use-package block. The require in init.el was itself commented out, so the file compiled on every make compile pass but nothing in it ever ran at startup.
The easy-hugo block motivated the new preview and publish commands that landed in the previous commit. The other entries (efrit, buffer-same-mode) have been dead code for months.
Also removes the "Cannot load pomm" warning that has been appearing on every make compile run.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Put the full Hugo workflow inside Emacs. All of it lives in modules/hugo-config.el.
New functions:
- cj/hugo-open-draft reads all .org files under content-org/log, finds those with #+hugo_draft: true, and offers a completing-read picker.
- cj/hugo-preview toggles a local hugo server subprocess and opens the preview URL in the browser. A second press stops the server.
- cj/hugo-publish opens magit-status on the website repo. The server-side post-receive hook on cjennings.net already rebuilds and deploys on push, so committing and pushing is the deploy.
Two pure helpers support the picker: cj/hugo--post-metadata parses the front matter region of a post, and cj/hugo--collect-drafts walks a directory and filters to drafts. Seven ERT tests cover both helpers across normal, boundary, and error cases.
Keybinding note: C-; h d and C-; h D have swapped roles. Lowercase d now opens the draft picker. Uppercase D toggles the draft flag in the current buffer. The previous lowercase-d binding was toggle.
|
| |
|
|
|
|
|
|
| |
Set load-prefer-newer in early-init.el. Emacs was loading the older .elc files even when the .el source was newer, warning on every load but still using the stale byte code.
Point weather-config.el's wttrin :load-path at /home/cjennings/code/emacs-wttrin. The previous value was /home/cjennings/code/wttrin, which does not exist, so use-package could not load the package.
Add (package-initialize) to the Makefile compile target. Without it, batch byte-compile cannot see ELPA packages like git-gutter, git-timemachine, forge, and difftastic, which produced "Cannot load" warnings on every run.
|
| |
|
|
| |
Default preset (BerkeleyMono) 140→120, fallback preset (FiraCode) 110→120.
|
| |
|
|
|
|
|
|
|
|
|
| |
Two cleanups round out the transcription-config refactor:
- cj/--running-transcriptions: the 'status = running' filter used by
cleanup and count helpers is now one function. Existing counter tests
cover both callers.
- cj/--format-transcription-entry: the 13-line dolist body inside
cj/transcriptions-buffer becomes a testable pure function. 6 tests
cover status-face mapping, basename-only rendering, duration format,
trailing newline.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Break cj/--transcription-sentinel's seven inline side-effects into named
helpers:
- cj/--write-transcript-on-success: writes process output to .txt on success
- cj/--append-to-log: appends event marker + process output to log
- cj/--update-transcription-status: marks tracking-list entry complete/error
- cj/--notify-completion: sends success or critical notification
Also: switch the tautological (cj/--should-keep-log t) to use the local
success-p (equivalent but matches the function signature), and rename
the unused audio-file sentinel arg to _audio-file.
Sentinel shrinks from 48 lines with 7 inline blocks to 14 lines of
straight-line helper calls. 10 tests cover the extracted helpers.
|
| |
|
|
|
|
|
|
|
|
|
| |
Pull two more helpers out of cj/--start-transcription-process:
- cj/--init-log-file: writes the initial log header with timestamp,
backend, audio file, script path
- cj/--track-transcription: pushes a running-status entry and refreshes
the modeline
Start-process shrinks from 58 lines with 4 levels of nesting to ~25 lines
mostly at depth 1-2. 10 tests cover the extracted helpers.
|
| |
|
|
|
|
| |
Pull the per-backend env-var assembly out of cj/--start-transcription-process
into a standalone pure function. 9 tests cover: the three backends, parent-env
preservation, non-mutation, missing-key user-error, unknown-backend error.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce cj/--transcription-backends alist mapping each backend to
(:script :auth-host :env-var). Replace:
- two near-identical cj/--get-{openai,assemblyai}-api-key functions with
a single parameterized cj/--auth-source-password helper
- the pcase in cj/--transcription-script-path with an alist lookup
- the pcase block in cj/--start-transcription-process that assembled
the API-key env var with an alist-driven assembly
Adding a new backend is now a single line in the alist. The existing
tests plus retargeted API-key tests (now 10, covering the parameterized
helper and the descriptor data) verify no behavior change.
|
| |
|
|
|
|
|
|
| |
cj/org-contacts-template-name and cj/org-contacts-template-email each
opened with (when (boundp 'cj/contact-name) ...) / (boundp 'cj/contact-email)
to pick up a caller-supplied preset. Neither variable is ever defined,
set, or let-bound anywhere in the config — the branches never ran. The
(or ...) fallbacks always took over, so behavior is unchanged.
|
| |
|
|
|
|
|
|
|
|
|
| |
The outer dolist in cj/check-for-open-work guarded its body with
(boundp 'base-dir), which always returns nil under lexical-binding
because base-dir is a lexical loop variable. Every repo under
projects-dir and code-dir was silently skipped; only org-dir and
user-emacs-directory (both top-level defvars) still got reconciled.
Remove the bogus boundp check. Add regression tests covering the
entry point itself — the existing suite only exercised the helpers.
|
| |
|
|
|
| |
Extract should-skip-p, pull-clean, pull-dirty from 6-level nested
reconcile-git-directory. Make find-git-repos recurse into sub-repos.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
New cj/todo-list-single-project prompts for a project, then shows the
daily agenda scoped to that project's todo.org plus calendars and inbox.
Moved cj/todo-list-all-agenda-files from C-f8 to s-f8.
|
| |
|
|
|
|
| |
Add nil bindings for F8 (agenda), F9 (gptel), and F10 (music) in
vterm-mode-map so these global keybindings aren't swallowed by vterm.
Also disable wttrin-debug and update abbreviations.
|
| |
|
|
|
| |
Replaced 4 copies of "if null calendars, warn" with a shared
calendar-sync--require-calendars predicate.
|
| |
|
|
|
| |
Deduplicated the folded-line handling loop from get-property and
get-all-property-lines into calendar-sync--unfold-continuation.
|
| |
|
|
|
| |
Extracted calendar-sync--extract-cn and calendar-sync--extract-email from
identical logic in parse-attendee-line and parse-organizer.
|
| |
|
|
| |
Function was defined but never called anywhere in the codebase.
|
| |
|
|
|
|
| |
Extracted completing-read+cancel pattern into cj/recording--select-from-labeled.
Reduces quick-setup nesting from 5 to 3 levels and eliminates duplicated
completion table lambda.
|
| |
|
|
|
| |
Moved Wayland/X11 command string construction into cj/recording--build-video-command.
Reduces ffmpeg-record-video from 70 to 25 lines, nesting from 4 to 2 levels.
|
| |
|
|
|
|
|
| |
test-mic/test-monitor
Both functions had identical record-5-seconds-and-playback logic. Extracted to
cj/recording--test-device with device, prefix, and prompt-action parameters.
|
| |
|
|
|
|
|
| |
function
Identical 31-line parser logic differed only in "Source #" vs "Sink #" header.
Replaced with cj/recording--parse-pactl-verbose taking a record-type parameter.
|
| |
|
|
|
|
|
|
|
|
| |
Music: random mode now respected by next/previous keys. Previous navigates
a 50-track play history ring buffer. Fixed playlist replacement bug.
24 new tests.
Calendar-sync: consolidated duplicate parse functions, extracted timezone
localization helper, unified expand-daily/monthly/yearly into parameterized
function, removed dead code. 33 new characterization tests. -90 lines.
|
| |
|
|
| |
Add org-tempo template expanding <cj TAB to #+begin_src cj: comment blocks.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add 47 new unit tests across 7 test files covering playlist-modified-p,
assert-valid-playlist-file, playlist-tracks, create-radio-station,
ensure-playlist-buffer, after-playlist-clear, and header-text.
Extract three helpers to reduce duplication: assert-m3u-files-exist (dedupes
2 identical guards), sync-playlist-file (dedupes 3 state-sync patterns),
and select-m3u-file (reusable M3U selection with cancel). Simplify
append-track-to-playlist nesting from 6 to 4 levels. Delete unused
cj/music-keymap-prefix variable.
|
| |
|
|
|
|
| |
Disable slack-buffer-emojify to prevent wrong-type-argument listp errors
on emoji characters during lui-scroll-post-command recenter. Add C-; O c
to reset org-element cache across all org-mode buffers.
|
| |
|
|
|
|
| |
Websocket library silently swallows callback errors via condition-case.
Wrap cj/slack-notify in condition-case to surface errors in *Messages*.
Add cj/slack-test-notify command for pipeline verification.
|
| |
|
|
|
| |
Pass missing team arg to slack-message-mentioned-p (was breaking all
channel notifications). Add cj/slack-close-all-buffers on C-; S Q.
|
| | |
|
| |
|
|
|
|
|
| |
date-to-time used (reverse date) which broke when RRULE UNTIL values
were parsed as 5-element lists (year month day hour minute) from UTC
timestamps. This caused recurring events with UTC UNTIL dates to
expand to 0 occurrences, producing stale calendar entries.
|
| |
|
|
|
|
|
| |
- Extract cj/gptel--build-model-list from cj/gptel-change-model
- Extract cj/gptel--current-model-selection from cj/gptel-change-model
- Add test-ai-config-build-model-list.el (9 tests)
- Add test-ai-config-current-model-selection.el (8 tests)
|
| |
|
|
|
|
|
|
|
|
| |
- Replace use-package gptel-magit hook with autoloads via
with-eval-after-load 'magit (loads gptel only on key press)
- Move org header defuns above use-package to fix load order
- Set gptel-include-reasoning to "*AI-Reasoning*" buffer
- Rebind rewrite to C-; a r, clear context to C-; a c
- Add test-ai-config-gptel-magit-lazy-loading.el (8 tests)
- Mark all ai-config cleanup items DONE in todo.org
|
| |
|
|
|
|
|
|
|
| |
- Move cj/gptel--fresh-org-prefix, cj/gptel--refresh-org-prefix,
cj/gptel-backend-and-model, cj/gptel-insert-model-heading out of
use-package :config to top level (fixes byte-compile warnings)
- Set gptel-include-reasoning to "*AI-Reasoning*" buffer
- Rebind rewrite to C-; a r, clear context to C-; a c
- Update todo.org with completed cleanup items
|
| |
|
|
|
|
|
|
| |
- Add testutil-ai-config.el with gptel stubs for batch testing
- Add tests for cj/gptel--model-to-string (9 tests)
- Add tests for cj/gptel--fresh-org-prefix (8 tests)
- Add tests for cj/gptel-backend-and-model (8 tests)
- Remove dead cj/gptel-backends defvar (duplicates cj/gptel--available-backends)
|
| |
|
|
|
|
|
|
| |
- Escape single quote in cj/ensure-gptel-backends docstring
- Wrap cj/gptel--available-backends docstring to 80 chars
- Add missing docstring to cj/gptel--model-to-string
- Rename cj/gptel--model->string to cj/gptel--model-to-string
- Mark stale model list task as DONE in todo.org
|
| |
|
|
|
|
| |
Remove redundant gptel-backend setq and orphaned section header.
Fix commentary keybinding references: M-a → C-; a, correct buffer
add (.) and rewrite (&) bindings.
|
| |
|
|
|
|
|
|
| |
Update Anthropic model list to current: claude-opus-4-6, claude-sonnet-4-6,
claude-haiku-4-5-20251001. Fix gptel--system-message not picking up the
custom default.org directive (defvar set at load time before gptel-prompts
replaces the default entry). Add cleanup tasks for ai-config, calibredb,
and slack reaction workflow to todo.org.
|
| |
|
|
|
|
| |
Notifications silently failed: slack-room-im-p (nonexistent) replaced
with slack-im-p; slack-message-to-string replaced with slack-message-body.
Mark-as-read bound to nonexistent function; added cj/slack-mark-read-and-bury.
|
| |
|
|
|
|
| |
Add emacs-slack config with auth-source credentials, DM/mention-only
notifications via notify script, compose buffer workflow, and dashboard
icon. Keybindings under C-; S prefix.
|
| |
|
|
|
|
| |
Replaced pylsp with lsp-pyright in prog-python.el for better type inference,
especially for Django ORM. Added Django engine and indent settings to web-mode
in prog-webdev.el. Pyright already installed via pacman.
|
| |
|
|
|
|
|
| |
New prog-json module: json-ts-mode with jq formatting (C-; f) and
jq-interactively (C-c C-q). Upgraded prog-yaml to yaml-ts-mode with
prettier formatting. Both use treesit-auto for grammar management.
Includes 18 new tests (10 JSON, 8 YAML), 185/185 passing.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Rework quick-setup device picker:
- Labels: [in use], [ready], [available], [muted] instead of
PulseAudio jargon (RUNNING/IDLE/SUSPENDED)
- Muted devices now shown (previously hidden) so users can see
all connected hardware and understand why a device is unsuitable
- Sink step shows which apps are playing through each output:
"JDS Labs Element IV [in use] (Firefox, Spotify)"
- Prompt changed from "audio output to monitor" to "audio output
to capture" to avoid PulseAudio monitor terminology confusion
- Sort order: in use → ready → available → muted
|