Fixes that only existed on the Linux machine (unpushed commit and uncommitted work there), without which a fresh clone breaks on Linux: - config.el resolved coe-xx/mostalive/qwan against ~/.doom.d, but the config lives at ~/.config/doom, so (require 'coe-xx) aborted startup with "Cannot open load file". Resolve them against doom-user-dir. - lisp/live-dictate.el only spoke whisper.cpp's POST /inference, which Lemonade (the Linux transcription server) does not serve -- every utterance came back as a not_found object and was dropped silently. It now auto-detects between /inference and the OpenAI-compatible /v1/audio/transcriptions endpoint, remembers which one answered, reports unusable replies, reads the VAD peak from the high byte of little-endian PCM16 (the low byte made silence look like speech), prints the peak level on stop, and gains M-x live-dictate-reload, wired into doom-after-reload-hook on both OSes. - config.el hardcoded the macOS org-directory (~/MyDocuments, inside iCloud). Where the notes live is now owned by config-linux.el (~/Documents) and config-mac.el (~/MyDocuments), and the OS leaf loads before org and org-roam load below instead of after them. Blog export targets stay in the OS files, where they belong. - mostalive/my-org-roam.el: compute org-agenda-files by listing the daily/ directory instead of org-roam-db-query at load time, and defer the full org-roam DB sync to idle time. Doom advises the first DB query of a session into a full org-roam-db-sync, which SHA1s all ~8.4k notes before the first frame is drawn (blank-screen startup). Also correct the ~/.doom.d paths in AGENTS.md, the export-test header and README that the sanitization base predated the fix for.
184 lines
7.8 KiB
Org Mode
184 lines
7.8 KiB
Org Mode
#+TITLE: Willem's Doom Emacs configuration
|
|
#+STARTUP: overview
|
|
|
|
* Overview
|
|
|
|
This is a personal Doom Emacs configuration for macOS and GNU/Linux, not a
|
|
universal drop-in distribution. It includes shared editor configuration,
|
|
separate machine module lists, OS-specific settings, and personal extensions.
|
|
|
|
The known working setup uses Emacs 30.2 and a Doom fork at
|
|
=~/.emacs.d/sources/doom+=. This is a description of the current working
|
|
machine, not a tested minimum version or a claim about stock Doom.
|
|
|
|
* Installation and configuration
|
|
|
|
A fresh clone does not contain a root =init.el=. That file is an ignored
|
|
symlink to the selected machine's module list. From the intended Doom
|
|
configuration checkout, link the machine configuration before syncing:
|
|
|
|
#+begin_src sh
|
|
./bin/link-machine.sh
|
|
doom sync
|
|
#+end_src
|
|
|
|
Do not run =doom sync= until the root =init.el= symlink exists: Doom can
|
|
regenerate an empty module list if it is missing. The script links either
|
|
=mac/init.el= or =linux/init.el= as the root =init.el= based on the host OS.
|
|
|
|
The expected installed location is =~/.config/doom=. Paths inside the config
|
|
resolve against =doom-user-dir=, so a checkout at another location works as
|
|
well; personal directories (org notes, blog checkouts) are home-relative.
|
|
|
|
Configuration is split as follows:
|
|
|
|
- =config.el= and =packages.el= are shared.
|
|
- =mac/init.el= and =linux/init.el= are the machine-specific module lists.
|
|
- =config-mac.el= and =config-linux.el= load OS-specific configuration from
|
|
the shared config dispatcher.
|
|
- =config-local.el= is optional, ignored by Git, and loaded last. Copy
|
|
=config-local.example.el= to =config-local.el= for private settings such as
|
|
=user-mail-address=, API keys, or machine-specific overrides. Keep secrets
|
|
out of tracked files.
|
|
|
|
The shared Org and Org-roam directories currently point under
|
|
=~/MyDocuments/qwan/essays/willem=. The Linux blog configuration already uses
|
|
=~/Documents= for the Jekyll checkout, while macOS uses =~/MyDocuments=.
|
|
Adapt these personal paths for your machine. Note that shared configuration
|
|
loads and queries Org-roam before the OS configuration and final
|
|
=config-local.el= are loaded. A late local override alone may therefore not
|
|
make every first-start path or dependency work; ensure the required paths and
|
|
packages are usable early in startup.
|
|
|
|
After changing Doom modules in an =init.el= or package declarations in
|
|
=packages.el=, run =doom sync= (only after confirming root =init.el= is linked),
|
|
then restart Emacs or use =M-x doom/reload= for configuration changes where
|
|
appropriate.
|
|
|
|
* Features
|
|
|
|
** Org-roam and publishing
|
|
|
|
- Insert a node link immediately with =SPC n r I=.
|
|
- Export an Org-roam note as a Firehose draft with =SPC n r b= or
|
|
=M-x org-roam-export-blog=.
|
|
- Export as a Jekyll draft with =SPC n r j= or
|
|
=M-x org-roam-export-jekyll=.
|
|
|
|
The exporters resolve public links where possible, degrade or drop private
|
|
references, copy linked images, and open the generated draft for review.
|
|
They report warnings, and their output should be checked carefully before
|
|
publishing. This is a personal publishing helper, not a universal privacy
|
|
guarantee.
|
|
|
|
The Org-roam preview helper is =qwan/brief-preview=. Journelly entries can be
|
|
converted to Org-roam notes with =journelly-convert-entry-to-org-roam=; its
|
|
example excerpt is retained as a public example.
|
|
|
|
** Markdown and text helpers
|
|
|
|
=qwan/qwan-markdown-dnd.el= adds file drag-and-drop support to Markdown and
|
|
GFM buffers. Its current handler copies the dropped file into the configured
|
|
attachment directory (default =attachments=) and inserts a Markdown link or
|
|
image link. The directory must already exist; the handler does not create it
|
|
or resolve name collisions automatically.
|
|
|
|
=M-x qwan/one-line-per-sentence= reformats a selected prose region by putting
|
|
sentences on separate lines. It is not a full Org-aware formatter.
|
|
|
|
Other personal helpers live under =qwan/=, =mostalive/=, =lisp/=, and
|
|
=coe-xx/=. The =coe-xx/= directory contains the cross-stitch pattern editor
|
|
and preserves its own attribution and license.
|
|
|
|
** gptel and Pi
|
|
|
|
The macOS setup defines local OpenAI-compatible backends and Ollama; successive
|
|
assignments mean the final normal =gptel-backend= binding is currently
|
|
=mlx-studio= on =localhost:8080=. The Linux setup leaves backend choices to
|
|
local configuration. These require the corresponding local or remote model
|
|
servers, and private API keys belong in ignored =config-local.el=. Custom
|
|
presets include code explanation, Elixir/Elisp help, and GLM workflows, but
|
|
some model/backend references may be stale and should be checked against the
|
|
models actually served.
|
|
|
|
Custom gptel tools include project search and a private Org-roam note search.
|
|
The GLM search command also invokes an external Python script that is not
|
|
included in this repository. Do not assume these tools or presets work without
|
|
their personal files, note database, executables, and compatible model server.
|
|
|
|
Pi integration is available through =M-x pi= when the external pi CLI is
|
|
installed and configured.
|
|
|
|
** Speech and dictation
|
|
|
|
The leader prefix =SPC A= provides Whisper actions: =w= records/transcribes,
|
|
=W= transcribes a file, =l= selects language, and =d= toggles live dictation.
|
|
FFmpeg and a suitable microphone/audio backend are required; macOS also needs
|
|
Emacs microphone permission. =M-x live-dictate-diagnose= checks the live
|
|
capture setup.
|
|
|
|
On macOS, =whisper.el= uses whisper.cpp remote mode at =localhost:13305=.
|
|
Linux uses a Lemonade/OpenAI-compatible transcription API. The separate
|
|
=lisp/live-dictate.el= client posts multipart WAV requests to whisper.cpp's
|
|
=/inference= endpoint; a Linux installation must point it at a compatible
|
|
endpoint separately. The Linux whisper.el setup does not automatically make
|
|
that live-dictate endpoint compatible.
|
|
|
|
** Magit and presentation
|
|
|
|
The configuration retains a Magit =diff-hl= refresh workaround and enables
|
|
=magit-delta=. Terminal delta formatting comes from settings outside this
|
|
repository (for example, the user's =~/.gitconfig=), not from this checkout.
|
|
|
|
The macOS Org module enables =+present=; Linux does not. The installed Doom
|
|
fork's presentation support includes centered-window, org-tree-slide, and
|
|
org-re-reveal.
|
|
|
|
* LaTeX and PDF export
|
|
|
|
Org's LaTeX export uses =latexmk= with =xelatex= and an =article= class with
|
|
Tufte-inspired styling (it is not a Tufte document class). The configured
|
|
fonts are ETBembo RomanOSF, Raleway, and Fira Code. Install those fonts on
|
|
whichever OS exports PDFs; the shared font setup is not inherently portable.
|
|
|
|
Check the tools with:
|
|
|
|
#+begin_src sh
|
|
command -v latexmk
|
|
command -v xelatex
|
|
#+end_src
|
|
|
|
On macOS, configuration appends =/Library/TeX/texbin= to =PATH=. Install a
|
|
TeX distribution that provides both tools using the appropriate method for
|
|
your platform; this repository does not prescribe an unverified package
|
|
manager recipe. Export/open a PDF through the Org export menu (=SPC m e=, then
|
|
=l o= with the configured Doom bindings).
|
|
|
|
* Tests
|
|
|
|
ERT tests are defined alongside several helpers and in
|
|
=qwan/org-roam-export-blog-test.el=. Run the self-contained suites from the
|
|
repository root with explicit loads:
|
|
|
|
#+begin_src sh
|
|
emacs --batch -Q -l ert -l qwan/qwan-dictation.el \
|
|
-f ert-run-tests-batch-and-exit
|
|
|
|
emacs --batch -Q -L qwan -l org-roam-export-blog \
|
|
-l qwan/org-roam-export-blog-test.el \
|
|
-f ert-run-tests-batch-and-exit
|
|
|
|
emacs --batch -Q -l ert -l mostalive/journelly-convert-entry-to-org-roam.el \
|
|
-f ert-run-tests-batch-and-exit
|
|
#+end_src
|
|
|
|
The Journelly parser tests can run without Org-roam, but invoking the
|
|
conversion command requires Org-roam and its capture/property functions. These
|
|
commands run selected standalone suites; they do not load every test in the
|
|
repository or imply that the entire existing test suite passes.
|
|
|
|
* License
|
|
|
|
The top-level [[file:LICENSE][GPL-3.0 license]] applies to this repository. The
|
|
=coe-xx/= directory retains its own license and attribution.
|