What to reach for when the config fails to load. Batch invocation details are in
batch-emacs.md.
doom doctoris the primary debug tool for config loading errors — run it and check for lines markedx:~/.config/emacs/bin/doom doctor 2>&1 | grep -A15 " x "- It reports runtime errors with backtraces, including the exact void symbol and call stack.
- Do NOT try to batch-load
config.eldirectly — Doom macros (doom!,after!, etc.) are undefined without the framework. Use the bootstrap sequence inbatch-emacs.mdinstead. after!load-order bugs: if a variable used inside(after! pkg ...)is defined later in config.el, it works in interactive Emacs (pkg loads after config) but fails indoom doctor(pkg may already be loaded, so the body runs immediately). Fix by defining the variable before theafter!block, or by adding the dependency to theafter!condition:(after! (pkg-a pkg-b) ...).- When
doom doctorreportsSymbol's value as variable is void, check whether the symbol is defined later in config.el than it is used inside anafter!body.