A `doom sync` run while the root init.el symlink was missing regenerates
Doom's profile startup file (.local/etc/@/init.<ver>.el) with a
doom-modules table holding only :doom/:user/:doom compat. No module
package lands on load-path, so `(require 'org-roam)` signalled
"cannot open load file" and aborted config.el mid-file -- taking the
OS leaf, the map! bindings and config-local.el with it, while
`doom doctor` reported nothing else.
- config.el: load org-roam with NOERROR, so a missing package can no
longer truncate the rest of the file.
- config.el: tripwire at the end that raises an error-level warning when
:lang org is absent from doom-modules, naming the real fix
(./bin/link-machine.sh && doom sync).
- agent-start-here.md: document that init.el is loaded with NOERROR, so
syncing without the symlink is silent and destructive, plus the
one-line check for the generated startup file.
Dictation was silent even with a working server: avfoundation index 0 on
this machine is "Microsoft Teams Audio", a virtual driver that records
pure digital silence, and the device was hard-wired to ":0".
- resolve the input device on darwin by name instead of by index, since
indices shift as devices appear and disappear; prefer
live-dictate-device-name-pattern (built-in microphone) and skip
virtual/loopback drivers matched by live-dictate-ignore-device-name
- allow the device to be pinned either as a raw index (":2") or as a
regexp matched against the reported device names
- announce the selected device when dictation starts and name it in the
silence warning
- add `live-dictate-stop' as an explicit command (the keybinding stays a
toggle: SPC A d starts and stops)
- add `live-dictate-diagnose', which lists the devices, records two
seconds and reports whether the chosen one delivers audio or digital
silence (the latter means the OS microphone permission is missing)
config-mac.el stops pinning ":0" and documents the auto-selection.
Live dictation sent the OpenAI realtime protocol to ws://host/v1/realtime,
which only Lemonade-style servers implement. Against the local
whisper-server on port 13305 every connection failed with
"websocket-received-error-http-response 404".
Retarget the module at whisper.cpp's native POST /inference endpoint:
- capture 16 kHz mono PCM16 with FFmpeg (now with binary process coding,
which the old version lacked and which would have corrupted the audio)
- cut the stream into utterances with an energy-based VAD: speech starts
above live-dictate-silence-threshold, flushes after a configurable
silence window, with pre-roll and a max-utterance cap
- wrap each utterance in a WAV header and post it with curl, one request
at a time so transcripts are inserted in spoken order
- insert text at the dictation marker with correct spacing, keep the
mode-line indicator and follow-cursor behaviour
- warn when the microphone delivers pure digital silence (OS permission)
New defcustoms: live-dictate-language, -prompt, -silence-threshold,
-silence-duration, -min-utterance, -max-utterance, -preroll.
Comments in config-mac.el and packages.el updated; websocket is no
longer needed by dictation.
The human runs homebrew's whisper.cpp server with
ggml-large-v3-turbo; that build serves only whisper.cpp's native
/inference endpoint, not an OpenAI-compatible one. Switch the block
from 'openai to 'remote mode: whisper.el then POSTs multipart
(file, response_format=json, language) to <baseurl>/inference and
parses the {"text": ...} reply, which matches whisper.cpp exactly
(verified against the installed whisper.el sources).
Drop the openai-mode-only settings (api key/model/baseurl); they are
inert in remote mode. The comment records the Lemonade-style
alternative and why live-dictate still needs such a backend.
Verified statically only (parens + endpoint/parsing traced in
whisper.el); runtime test pending with the human.
The mac side of the unified migration is done and verified (doom sync,
eglot/expert for elixir-ts and heex-ts, flycheck, code actions). The
note now records:
- agent-environment lessons: pi sandbox blocks writes to ~/.emacs.d
(humans must run doom sync/env), sandbox PATH lacks /opt/homebrew/bin,
eglot is lazy on the mac (checks need (require 'eglot) first), doom is
a fork at ~/.emacs.d/sources/doom+.
- STT facts gathered this session: whisper.el server modes, brew's
whisper-server serving only /inference, live-dictate's ws /v1/realtime
requirement, GGML model provenance, sox/ffmpeg present.
- updated known-defects list, including that config-local.el now really
loads (1e1ad31) and Linux must check for a stale one.
The config comments (and config-local.example.el) promise that
machine-specific backends, secrets and paths live in config-local.el,
but nothing ever loaded it -- Doom does not auto-load it either, so any
settings written there were silently inert on both machines.
Load it at the very end of config.el, guarded by file-exists-p!, so a
missing file is a no-op and existing overrides beat the shared config
and the OS leaves.
Verified statically on the mac only (parens; no config-local.el exists
here yet, so behavior is unchanged until one is created).
Mirror the config-linux.el block so both machines have the same
capabilities. packages.el already declares whisper and websocket, and
lisp/live-dictate.el already picks avfoundation for FFmpeg input on
darwin; this adds the use-package! whisper block, the SPC A leader
keys, the live-dictate autoload, and the mac-specific audio input
device (":0" = no video, default microphone, TCC permission prompt on
first use).
Still needs a backend on this machine: an OpenAI-compatible
transcription server on localhost:13305 (Lemonade as on Linux, or
whisper.cpp's server, or a remote host). Until then the commands bind
but fail to connect.
Verified statically on the mac only (parens); runtime needs doom sync.
The old hard-coded ~/.elixir-ls path no longer exists on this machine,
so eglot had no usable Elixir server (and .heex files had none at all).
Mirror the Linux logic from config-linux.el: prefer `expert` (installed
at /opt/homebrew/bin/expert), else any language_server.sh on PATH, else
leave eglot at its default. Covers elixir-mode, elixir-ts-mode and
heex-ts-mode, closing the heex gap left when b425df9 moved server
ownership to the OS files.
Verified on the mac only.
Handoff note for the next session on the mac: what the three `unified`
commits changed, why the shared/OS ownership now looks the way it does, the
pull -> link-machine.sh -> doom sync -> restart sequence, static and runtime
checks, the still-pending elixir server decision, and the shared defects not
to trip over (pi-coding-agent, org paths, LaTeX fonts, duplicated blog
roots).
It also records what is intentionally absent on the mac: no STT (the whisper
block is Linux-only, though the packages now install everywhere) and no
configured eglot server for heex-ts-mode until the mac-side fix lands.
The imported Linux-side STT code was inert without these:
- `websocket' is a hard Package-Requires of lisp/live-dictate.el and is what
makes streaming dictation possible.
- `whisper' gates the `use-package! whisper ...' block in config-linux.el,
which also autoloads `live-dictate'.
`doom sync' is required on both machines afterwards. On the mac the two
packages get installed but stay unused, since the whisper/live-dictate block
lives in config-linux.el.
The shared config.el hard-coded ("expert" "--stdio"), a mac-flavoured value
from upstream c83209e, so it leaked into the Linux machine, where neither
`expert' nor language_server.sh is installed and eglot was therefore
configured with a program that cannot start.
c2f24ba claimed the Linux fallback fixed this, but it only overrides *when
it finds a server*: with nothing installed the broken shared value survived.
The correction is to remove the shared setting entirely. config-mac.el
already configures the mac's elixir-ls, and config-linux.el's cond now means
"nothing found" leaves eglot at Emacs' default instead of pointing at a
missing binary.
config-linux.el's header comment said the shared file "used to point eglot
at a macOS path"; reword it to state that the shared file does not configure
the server at all, and why.
The typescript/tsx entries were nested one list too deep, so lookups for
those languages could never match, and the `dolist' that installed missing
grammars then errored out. Neither language is used here, so remove both
entries and the installer rather than leave a broken path in the shared
config. heex and elixir stay.
Re-add the entries (with the correct nesting) when typescript is next used.
Scratch prompts handed to agent sessions land in the repo root while work
is in progress. Ignoring /prompt-*.md keeps them out of `git add -A' and
out of history, without having to remember to delete them first.
Dropped because the UX is confusing and it went unused. Removed:
config.el rmh-elfeed-org-files, elfeed-search-filter, the custom
"elfeed:" org link type (follow + store), the SPC o e
binding, my/elfeed-entry-to-org-roam and its SPC "e"
capture template, and the two elfeed-mode keybindings
mac/init.el ;;(rss +org) -- the module exists only to provide elfeed,
so it is now disabled here too (it already was in
linux/init.el)
elfeed.org the feed list, 20 feeds
Kept: the org-link-preview binding (SPC m l p), which sat between the
elfeed blocks and has nothing to do with it.
After pulling on the mac: doom sync, since a module left the list.
Two leftovers this commit does not touch:
- the feed list Emacs actually read is ~/Documents/qwan/essays/willem/
elfeed.org (905 bytes, newer than the copy deleted here) because
rmh-elfeed-org-files was relative to org-directory. That file now has
no consumer, and it sits inside org-roam-directory, so it will still
show up as a node until you delete or archive it.
- notes captured with my/elfeed-entry-to-org-roam contain
[[elfeed:...]] links whose link type no longer exists. They open as
unknown links now. I could not check how many there are: the vault is
not readable from this sandbox.
Doom's `doom!' takes a single module list, so this file cannot be shared:
the two machines want different module sets (vertico + popup + workspaces
here, ivy + dashboard + doom-quit there), and the mac list still carries
pre-3.0 names that this Doom rejects. Instead of merging 143 lines of it,
each machine keeps its own copy:
linux/init.el from linux-adopt, verbatim (cmp: identical)
mac/init.el the previous root init.el, verbatim (cmp: identical)
The root init.el is now an *untracked* symlink into whichever directory
matches the machine, created by bin/link-machine.sh. It has to be
untracked: one branch is shared by both machines, and a tracked symlink can
only have one target. /init.el is gitignored so a stray link can never be
committed and clobber the other machine.
Verified:
- link resolves: file-truename init.el -> .../linux/init.el
- the file parses (check-parens) through the link
- sh -n clean; unknown-machine path exits 1 with a message
- git status clean apart from this commit (symlink is ignored)
On the mac, after pulling: ./bin/link-machine.sh && doom sync
Caveats, all consequences of the link being untracked:
- a fresh clone has no init.el until you run the script
- `git clean -xfd' deletes it; re-run the script
- Emacs' byte-compiler would write init.elc next to the link (repo root);
harmless here since *.elc is ignored and the target's mtime wins when
the .el has been edited
config.el and packages.el stay shared at the root for now: their content is
mostly common, and three-way merges are worth more there than isolation.
That is also why AGENTS.md, snippets/ and qwan/ stay where they are.
Pure additions (18 lines, no deletions) on top of upstream's config-mac.el:
- header note that the file is seeded from 0789326 and is now owned here,
so re-syncing it with `git checkout mac/master -- config-mac.el' is no
longer safe
- the eglot entry for elixir-ts-mode that was hard-coded in the Linux repo's
shared config.el as /Users/willem/.elixir-ls/... It belongs on the mac
side; the Linux counterpart is in config-linux.el
- blog export roots, with ~/MyDocuments/... as on macOS
This file only loads on darwin, so nothing changes for the Linux machine.
Replaces upstream's empty stub with the Linux side of the split, from
linux-adopt:
- blog export roots (firehose, jekyll) with the paths that exist here
(~/Documents/..., not upstream's ~/MyDocuments/...)
- elixir language server: `expert' if installed, else any elixir-ls on
PATH, else leave eglot unconfigured instead of pointing it at a server
that cannot start
- the whisper/STT block, moved out of the Linux repo's shared config.el and
documented as Linux-only: whisper.el + Lemonade on :13305 + PulseAudio
capture. It is gated behind `(use-package! whisper ...)', so it stays
inert until that package is declared in packages.el -- which is still
hand-merge territory and not done here.
Nothing on the mac side loads this file; it is selected by the
`pcase system-type' dispatch at the end of config.el.
Two files that exist only on the Linux side, taken verbatim:
lisp/live-dictate.el streaming dictation over the Lemonade
OpenAI-compatible API (linux repo 978aa86)
qwan/firehose-blog.el drag-and-drop images into a firehose blog post,
with year dirs, collision suffixes and 16 ERT tests
Both are inert until something requires them. Wiring lives in
config-linux.el (next commit), not in the shared config.el: live-dictate
depends on whisper.el plus a Lemonade server on :13305, and on macOS
neither exists yet. Getting live dictation working there is a feature,
not a port: ffmpeg capture, an installed whisper.el, and a reachable
backend.
firehose-blog.el is OS-independent by design and should later replace
qwan/qwan-markdown-dnd.el on both sides -- see the note in config.el.
The linux config was bootstrapped by copying files out of this repo and has
no common ancestor with it. Recording it here makes the shared history
navigable from one repo: 17 commits of linux work plus the 4 commits that
paid back the org-roam blog export and split shared config from OS config.
The tree is deliberately unchanged (-s ours). Content adoption from
linux-adopt happens in follow-up commits, file by file, so each decision
stays reviewable.
config.el require org-roam-export-blog; SPC n r b / SPC n r j
config-linux.el firehose ~/dev/elixir/firehose, jekyll ~/Documents/...
config-mac.el firehose ~/dev/elixir/firehose, jekyll ~/MyDocuments/...
Upstream sets both roots in the shared config.el. That does not survive the
trip: the jekyll checkout is ~/MyDocuments/qwan/sites/qwaneu.github.io on
macOS and ~/Documents/qwan/sites/qwaneu.github.io here (both verified to
exist). So the roots go to the OS files and the shared half holds only the
require and the bindings. Paths are home-relative, and config-local.el can
override them if a checkout ever moves.
Prefix SPC n r was unused in this config, so no rebinding.
Verified in a scratch checkout: the imported suite passes 20/20
(emacs -Q --batch -L qwan -l qwan/org-roam-export-blog.el
-l qwan/org-roam-export-blog-test.el -f ert-run-tests-batch-and-exit)
and the existing firehose-blog suite still passes 16/16.
New files, no local counterpart, taken verbatim from upstream:
qwan/org-roam-export-blog.el org-roam note -> firehose draft / jekyll draft
qwan/org-roam-export-blog-test.el 364-line ERT suite for the above
qwan/test-fixtures/vault/ vault fixture (notes + .attach tree)
mostalive/{my-org-roam,convert-chats-to-org,journelly-convert-entry-to-org-roam}.el
config-local.example.el template for gitignored config-local.el
elfeed.org, mise.toml feed list; node 24 pin (2ad9dfd)
Not imported, deliberately:
qwan/qwan-markdown-dnd.el earlier, cruder prototype of the same idea as
our firehose-blog.el: copies dropped files to a
cwd-relative dir, overwrites on name clash,
no year dirs, no tests, and evaluates an
ert-deftest at load time (upstream had to
disable it in 7153a24/e1d2415). Installing it
alongside firehose-blog.el would put two
handlers in dnd-protocol-alist for markdown
buffers. Ours supersedes it.
.devcontainer/, run-container.sh, coe-xx/, .pi/, CLAUDE.md, investigation.md
container/game-and-watch/agent scaffolding
README.org, AGENTS.md upstream's docs; ours are doom-specific
Nothing is wired up yet -- these files are inert until the next commit
requires them. Note that mostalive/my-org-roam.el shadows the `my-org-roam'
we currently load from ~/dev/emacs/org-roaming, so do not put mostalive/ on
the load-path without deciding which one wins.
Introduces the seam that makes adopting upstream changes safe: config.el
holds what every machine shares, and a pcase on `system-type` at the end of
it loads exactly one OS file. Leaves are loaded last on purpose, so they
can override shared settings such as `gptel-backend'.
config-mac.el seeded from mac repo 0789326 and now owned locally
config-linux.el new; Linux paths and binaries only
config-local.el per-machine, gitignored (template: config-local.example.el)
Nothing changes for the current machine. The one line that moved -- the
eglot entry pointing elixir-ts-mode at /Users/willem/.elixir-ls/... -- was
already dead on Linux; it now lives in config-mac.el, and config-linux.el
picks `expert', any elixir-ls on PATH, or nothing at all, in that order.
Rationale: upstream already ships this exact layout (236c0e1 "refactor
config for multi-machine support"), so adopting it costs nothing and every
later upstream hunk then has an obvious correct home -- shared, mac, linux,
or not-committed.
Verified: parens/strings parse in all five .el files; `load!' arity checked
against doom-lib.el (filename &optional path noerror).
custom.el is written by Emacs itself (customize-set-variable) and was
committed on 2024-07-30 by accident. Upstream mac repo dropped it in
e8df0c9; adopting the same rule here so it can never come back.
Also ignores config-local.el (per-machine backends/paths, template in
config-local.example.el) and stale *.elc.
Export ends by visiting the generated post with find-file-other-window,
so the note stays visible next to the draft it produced; the git diff
on the generated file acts as the review step. Pinned by an ERT test
through the interactive run path.
Move the firehose exporter here from the firehose repo scripts directory
and rename it to the org-roam- prefix so M-x org-roam-export-blog sits
with the other roam commands. Both commands share one pipeline; each
target contributes frontmatter, post path and image convention:
- org-roam-export-blog: firehose draft (Elixir frontmatter, images to
app/priv/static/images/blog), bound to SPC n r b
- org-roam-export-jekyll: jekyll draft in _drafts/ (YAML frontmatter,
tags from #+filetags:, images to attachments/blogposts), bound to
SPC n r j
Repo roots are defcustoms set home-relative in config.el so one value
works on macOS and Linux; unset or absent roots fail loudly. ERT tests
and the fixture vault live alongside; run with the emacs --batch
command in the test file commentary.
Also split per-machine config: config.el now loads config-mac.el only
on darwin and the new config-linux.el on GNU/Linux, and ignores stale
*.elc files that would otherwise shadow newer sources.
journelly-parse-entry called cl-lib-find-if, cl-lib-position,
cl-lib-subseq and cl-lib-remove-if, which do not exist and signal
void-function at runtime. Rename them to the actual cl-lib names
(cl-find-if, cl-position, cl-subseq, cl-remove-if) and re-enable the
two ERT tests covering the parser.
Both tests pass: (ert "test-journelly-*")
custom.el is listed in .gitignore but was already tracked, so the
ignore had no effect. It holds machine-local customize state
(absolute paths) and keeps churning; untrack it. The file stays
on disk, so Emacs behavior is unchanged.
- init.el: rename :ui doom-dashboard to dashboard (Doom 3.0 rename),
enable :editor fold, fix garbled file-templates comment line
- packages.el: install pi-coding-agent from dnouri/pi-coding-agent
on GitHub instead of the default recipe
- mostalive/journelly-convert-entry-to-org-roam.el: replace obsolete
cl-lib-defstruct with cl-defstruct
- custom.el: record accepted safe-local-variable value (auto-generated)
Adds a localleader binding in org-mode buffers under the existing
SPC m l (links) prefix. org-link-preview is the Org 9.8 replacement
for org-toggle-inline-images.
The ':lang org +pomodoro' flag was obsoleted in Doom 25.04 and no
longer installs the package, so M-x org-pomodoro was missing. Install
it via packages.el and remove the dead flag from init.el.
- Fix org DND flag: +download-dnd → +dragndrop (was silently no-op)
- New qwan-markdown-dnd.el: handles file drops in markdown buffers
copies images to configurable attachment dir (default: attachments/)
inserts markdown image links at point
per-repo config via .dir-locals.el (qwan-markdown-attachment-dir)
- AGENTS.md: document the new module and DND setup
- Custom elfeed: link type that opens entries directly in elfeed
- Updated my/elfeed-entry-to-org-roam to include elfeed link in note body
- Notes now have both ROAM_REFS (web URL) and elfeed link (local viewing)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move gptel backend configuration to config-local.el (gitignored) so each
machine can have its own LLM setup. Add config-local.example.el as a
template with options for Ollama, remote llama.cpp, and local llama.cpp.
Also make OS-specific paths portable:
- Use ~ instead of hardcoded /Users/willem for elixir-ls
- Wrap macOS TeX path in system-type conditional
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
qwen 0.6 had the good sense to go untiil end of the line with the regexp,
but called the wrong regexp function - or called it wrongly. elisp
'helpfully' gave End of File error.
qwen MoE 30 got the correct function, but put in a regexp that only
removed the ?. So I added `.*$` by hand, and it passed manual testing.
Since I will be using this a lot, no unit-ish test needed. (test
everything that can possibly break). Tested on mac, should work on
linux (according to MoE30)