2.3 KiB
Modular Emacs Configuration
Overview
The Emacs configuration has been migrated from a monolithic `emacs.org` file to a modular, directory-based architecture. This system is designed for high maintainability, literate programming, and seamless integration with the Personal Software Foundry (PSF).
Architecture
1. Initialization Loop (~/.emacs)
The entry point (`~/.emacs`) bootstraps `straight.el` and then uses `org-babel-load-file` to trigger the modular configuration chain starting from `~/memex/system/dotemacs.org`.
2. The Orchestrator (dotemacs.org)
Located at `~/memex/system/dotemacs.org`, this file serves as the "Orchestrator." It uses `load-file` to sequentially execute the tangled `.el` versions of each module in the system directory.
3. Functional Modules (emacs-*.org)
The configuration is split into domain-specific Org-mode files within `~/memex/system/`:
- `emacs-core.org`: Package management (straight.el), performance, and global variables.
- `emacs-org.org`: Core Org-mode settings, capture templates, and file paths.
- `emacs-gtd.org`: org-gtd v4.0 and task management.
- `emacs-roam.org`: Zettelkasten and daily notes setup.
- `emacs-ai.org`: Integration with LLMs and agents.
- (Other modules: `media`, `writing`, `shell`, `misc`, `early-init`).
Path Normalization
A critical part of the migration was standardizing all internal paths to the `memex` structure:
- `org-directory`: `~/memex/`
- `org-roam-directory`: `~/memex/notes/`
- `org-roam-dailies-directory`: `~/memex/daily/`
- `inbox.org` and `gtd.org` are now in the root of `~/memex/`.
Operational Mandates
- Literate Programming: All configuration MUST be written in `.org` files.
- Kebab-Case: All file naming follows the kebab-case (hyphens) standard.
- Tangle Local: Every module tangles to its own `.el` file in the same directory (`:tangle yes`) to ensure loading efficiency.