fix(config): stop a stale module list from silently disabling config.el
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.
This commit is contained in:
@@ -33,6 +33,18 @@ checks; the `alist-get`/`setf` pattern unit-tested in vanilla Emacs 30.2.
|
||||
the human asks.
|
||||
- Never run `git clean`. The root `init.el` is an untracked, gitignored
|
||||
symlink; `git clean -xfd` deletes it. Recreate with `./bin/link-machine.sh`.
|
||||
- **Never run `doom sync` without a root `init.el`.** Doom loads `init.el`
|
||||
with NOERROR, so a missing symlink is not an error: `doom!` never runs,
|
||||
Doom regenerates `$EMACSDIR/.local/etc/@/init.<emacs-version>.el` (the
|
||||
generated startup file) with a `doom-modules` table containing only
|
||||
`:doom`/`:user`/`:doom compat`, and from then on **no module packages are
|
||||
on `load-path`** — `(require 'org-roam)` dies, module config/init files
|
||||
don't load, and every setting after the failing form in `config.el`
|
||||
silently stops working. `doom doctor` still looks healthy apart from that
|
||||
one error. Always `./bin/link-machine.sh` first, then `doom sync`.
|
||||
To check: `grep -l '(:lang . org)' ~/.emacs.d/.local/etc/@/init.*.el`
|
||||
must list the file for your Emacs version. This is what broke org-roam
|
||||
on 2026-11-05 and again on 2026-11-14.
|
||||
- Never commit `init.el`, `custom.el`, `config-local.el`, or `*.elc`.
|
||||
- `config.el` and `packages.el` are shared by both machines. Prefer
|
||||
`config-mac.el` / `config-linux.el` for machine-specific work.
|
||||
|
||||
Reference in New Issue
Block a user