#+TITLE: Module Inventory — init.el Load Graph #+AUTHOR: Craig Jennings #+DATE: 2026-05-24 * Purpose Living per-module inventory for the [[file:init-load-graph.org][init.el load-graph refactor]]. The spec's module-category table is the seed; this file is the per-module truth as each module is inspected and classified. A module moves from [[*Pending classification][Pending classification]] into [[*Classified modules][Classified modules]] once its source has been read and its load-graph header written. Phase 1 exit criterion: every module required by =init.el= (102 total) is represented here with a category and target load shape, every eager survivor has a documented reason, and top-level timer/process/network side effects are identified. Classification proceeds in batches; the header-validation test =tests/test-init-module-headers.el= enforces the contract on each classified module. This inventory is independent from the helper inventory owned by =utility-consolidation.org=. * Status - Phase 1 (Inventory and Contracts), in progress. - Batch 1 (Foundation, Layer 1): classified. 7 modules. - Batch 2 (Text/editing command modules, Layer 2): classified. 9 modules. - Batch 3 (Core libraries and command modules): classified. 7 modules. - 23 of 102 modules classified. - No load-order changes have been made; =init.el= keeps its current eager order. * Legend Category key (a module may carry two, e.g. =F/S=): - =F= foundation or shared library/config - =C= core eager UX - =P= package configuration (usually hook/command/package loaded) - =D= domain workflow with a possible eager reason - =S= startup side-effect / timer / process owner - =O= optional, entertainment, experimental, rarely used - =L= pure-ish library / command helpers, easy to load directly Load shape: =eager= | =hook= | =mode= | =command= | =after-load=. Direct test load: =yes= | =conditional= | =no= — can the module be loaded directly in batch without first loading the rest of init? * Classified modules ** Batch 1 — Foundation (Layer 1) | Module | Layer | Cat | Current | Target | Runtime requires | Top-level side effects | Direct load | |--------+-------+-----+---------+--------+------------------+------------------------+-------------| | =system-lib= | 1 | F/L | eager | eager | none (auth-source on demand) | none | yes | | =user-constants= | 1 | F | eager | eager | none | file writes: creates configured dirs/files at load | conditional | | =host-environment= | 1 | F/L | eager | eager | none (battery on demand) | none | yes | | =system-defaults= | 1 | F/S | eager | eager | autorevert, server, bookmark, host-environment, user-constants | global setq, display-warning advice, display-buffer-alist entry, one key remap | conditional | | =keyboard-compat= | 1 | F/S | eager | eager | host-environment | adds emacs-startup-hook | yes | | =keybindings= | 1 | F/C | eager | eager | user-constants, which-key, free-keys | defines cj/custom-keymap + cj/jump-map, binds global keys, which-key labels | conditional | | =config-utilities= | 1 | C/O | eager | eager | cl-lib, cl-generic, eieio, find-lisp, profiler | defines cj/debug-config-keymap, binds C-c d | yes | Every Batch 1 module stays eager: each satisfies a spec eager-reason condition (shared helpers, path constants, core Emacs behavior, or the global keymap owner). Reasons are recorded in each module's load-graph header. ** Batch 2 — Text/editing command modules (Layer 2) The =custom-*= text-command helpers. Each is eager only to register a =C-;= submap (or direct bindings) at load; none has a necessary eager reason, so all are deferral candidates for Phase 3 (registration API) and Phase 4 (command/autoload). Target load shape is command-driven. | Module | Layer | Cat | Current | Target | Runtime requires | Top-level side effects | Direct load | |--------+-------+-----+---------+--------+------------------+------------------------+-------------| | =custom-case= | 2 | L/C | eager | command | keybindings | cj/case-map under C-; c; remaps capitalize-region | yes | | =custom-comments= | 2 | L/C | eager | command | keybindings | cj/comment-map under C-; C | yes | | =custom-datetime= | 2 | L/C | eager | command | keybindings | cj/datetime-map under C-; d | yes | | =custom-buffer-file= | 2 | L/C | eager | command | external-open, mm-decode, system-lib | cj/copy-buffer-content-map, cj/buffer-and-file-map; C-; b registration boundp-guarded | conditional | | =custom-line-paragraph= | 2 | L/C | eager | command | keybindings (expand-region on demand) | cj/line-and-paragraph-map under C-; l | yes | | =custom-misc= | 2 | L/C | eager | command | keybindings | align-regexp advice; direct C-; bindings | yes | | =custom-ordering= | 2 | L/C | eager | command | cl-lib, keybindings (org-config on demand) | cj/ordering-map under C-; o | yes | | =custom-text-enclose= | 2 | L/C | eager | command | keybindings (change-inner on demand) | cj/enclose-map under C-; s | yes | | =custom-whitespace= | 2 | L/C | eager | command | keybindings | cj/whitespace-map under C-; w | yes | ** Batch 3 — Core libraries and command modules The remainder of init.el's early/core block: shared command libraries and a few eager side-effect owners. | Module | Layer | Cat | Current | Target | Runtime requires | Top-level side effects | Direct load | |--------+-------+-----+---------+--------+------------------+------------------------+-------------| | =external-open= | 2 | L/D | eager | command | host-environment, system-lib, external-open-lib, cl-lib | none | yes | | =media-utils= | 3 | D/L | eager | command | system-lib | none | yes | | =auth-config= | 1 | F/D | eager | eager | system-lib, user-constants | auth-source/epa config | yes | | =keyboard-macros= | 2 | C/L | eager | command | subr-x, user-constants | none | yes | | =system-utils= | 2 | L/C/S | eager | eager | system-lib, external-open-lib | 3 global keys, 1 startup hook | yes | | =text-config= | 2 | C/P | eager | eager | none | 3 add-hook, package config | yes | | =undead-buffers= | 2 | C | eager | eager | none | 3 global keys (kill-buffer remap) | yes | * Hidden dependencies found Discoveries that belong to Phase 2 (make dependencies explicit). Recorded here, not fixed here. - =system-defaults= reads =env-bsd-p= (host-environment) and =user-home-dir= (user-constants) at *load* time, but declares both only via =eval-when-compile=. The compiled module therefore cannot load standalone — it works at startup only because =init.el= requires host-environment and user-constants earlier. Phase 2 fix: promote the two =eval-when-compile= requires to plain runtime =require=. (Test =test-system-defaults-functions.el= was updated to require host-environment so the unit loads in isolation; the production fix is still pending.) - =custom-buffer-file= registers its =C-; b= submap behind =(when (boundp 'cj/custom-keymap) ...)= and declares =cj/custom-keymap= only via =eval-when-compile=. Loaded standalone without keybindings, the =boundp= guard is nil and the binding silently drops. That guard is the "define-if-not-present" shim the spec warns against. Phase 2/3 fix: require keybindings (or use the registration API once it exists) and drop the guard. * Pending classification The remaining 79 modules required by =init.el=, awaiting per-module inspection. Each batch reads these against their source and moves them into [[*Classified modules][Classified modules]] with a load-graph header. Suggested batch order follows the spec: text/editing command modules, then UI, then programming, then Org, then optional integrations. - [ ] ai-config - [ ] ai-vterm - [ ] browser-config - [ ] calendar-sync - [ ] calibredb-epub-config - [ ] chrono-tools - [ ] coverage-core - [ ] coverage-elisp - [ ] dashboard-config - [ ] dev-fkeys - [ ] diff-config - [ ] dirvish-config - [ ] dwim-shell-config - [ ] elfeed-config - [ ] erc-config - [ ] eshell-config - [ ] eww-config - [ ] flycheck-config - [ ] flyspell-and-abbrev - [ ] font-config - [ ] games-config - [ ] gloss-config - [ ] help-config - [ ] help-utils - [ ] httpd-config - [ ] hugo-config - [ ] jumper - [ ] latex-config - [ ] linear-config - [ ] local-repository - [ ] lorem-optimum - [ ] mail-config - [ ] markdown-config - [ ] modeline-config - [ ] mousetrap-mode - [ ] music-config - [ ] nerd-icons-config - [ ] org-agenda-config - [ ] org-babel-config - [ ] org-capture-config - [ ] org-config - [ ] org-contacts-config - [ ] org-drill-config - [ ] org-export-config - [ ] org-noter-config - [ ] org-refile-config - [ ] org-reveal-config - [ ] org-roam-config - [ ] org-webclipper - [ ] pdf-config - [ ] popper-config - [ ] prog-c - [ ] prog-general - [ ] prog-go - [ ] prog-json - [ ] prog-lisp - [ ] prog-python - [ ] prog-shell - [ ] prog-training - [ ] prog-webdev - [ ] prog-yaml - [ ] quick-video-capture - [ ] reconcile-open-repos - [ ] restclient-config - [ ] selection-framework - [ ] slack-config - [ ] system-commands - [ ] telega-config - [ ] test-runner - [ ] tramp-config - [ ] transcription-config - [ ] ui-config - [ ] ui-navigation - [ ] ui-theme - [ ] vc-config - [ ] video-audio-recording - [ ] vterm-config - [ ] weather-config - [ ] wrap-up