Emacs Configurations
Table of Contents
- 1. Introduction
- 2. Tangling All Configurations
- 3. Configuration Sections
- 3.1. Early Initialization
- 3.2. Core Initialization
- 3.3. Theme and Appearance
- 3.4. Window Management
- 3.5. Completion System
- 3.6. Directory Editor (Dired)
- 3.7. Documentation (Org-mode & Markdown)
- 3.8. Shell Integration
- 3.9. Programming Languages
- 3.10. Miscellaneous
- 3.11. Platform-Specific Configurations
1. Introduction
This is my comprehensive Emacs configuration written in a literate programming style using Org-mode. The configuration is split into modular sections for better organization and maintainability.
1.1. How This Works
- Tangling: Since configurations are modular, you can:
- Run
./tangle.shfrom the repository root (recommended - handles all files recursively) - Tangle individual files: Open a config file and run
C-c C-v t - Use the Elisp helper: See "Tangling All Configurations" section below
- Run
- Exporting: Use
C-c C-e h hto export this document to HTML for publishing - Modular Structure: Configuration files are organized in
configs/with subdirectories:- Top-level files for core Emacs settings
programming/for language-specific configurationsdocumentation/for document format configurations (Org-mode, Markdown)
1.2. Quick Start
- Clone this repository
- Run
./tangle.shfrom the repository root (recommended) - Restart Emacs
Alternative methods:
- From Emacs: Navigate to "Tangling All Configurations" section and execute the code block (
C-c C-c) - Individual files: Open a config file and run
C-c C-v t
1.3. File Structure
The configuration is organized as follows:
- Early Init - Performance optimizations that must load before anything else
- Init - Core Emacs settings and built-in packages
- Theme - Visual appearance and mode line configuration
- Window - Window management and layout
- Completion - Completion frameworks and interfaces
- Dired - Directory editor enhancements
- Documentation - Modular documentation system (Org-mode, Markdown)
- General documentation tools
- Org-mode configurations
- Markdown configurations
- Shell - Terminal and shell integration
- Programming - Modular language-specific configurations
- General programming tools
- Web development (HTML/CSS/JS/TypeScript)
- Python development
- Ruby development
- Miscellaneous - Utilities and helper functions
- Platform-Specific - OS-specific configurations
2. Tangling All Configurations
2.1. Using tangle.sh (Recommended)
The repository includes a tangle.sh script that automatically finds and tangles all configuration files recursively:
./tangle.sh
This script:
- Recursively processes all
.orgfiles incontent/emacs/configs/ - Includes subdirectories (
programming/,documentation/) - Creates required directories (
~/.emacs.d/elisp/) - Shows progress for each file
2.2. Using Elisp Helper (Alternative)
Alternatively, execute this code block from within Emacs by placing your cursor inside it and running C-c C-c:
(let ((default-directory (file-name-directory (buffer-file-name))) (config-files '("configs/01-early-init.org" "configs/02-init.org" "configs/03-theme.org" "configs/04-window.org" "configs/05-completion.org" "configs/06-dired.org" "configs/07-docs.org" "configs/documentation/00-loader.org" "configs/documentation/01-general.org" "configs/documentation/02-org.org" "configs/documentation/03-md.org" "configs/08-shell.org" "configs/09-programming.org" "configs/programming/00-loader.org" "configs/programming/01-general.org" "configs/programming/02-web.org" "configs/programming/03-python.org" "configs/programming/04-ruby.org" "configs/10-miscellaneous.org" "configs/11-platform-linux.org" "configs/12-platform-macos.org" "configs/13-platform-windows.org"))) (dolist (file config-files) (let ((filepath (expand-file-name file))) (when (file-exists-p filepath) (message "Tangling %s..." file) (org-babel-tangle-file filepath)))) (message "All configurations tangled successfully!"))
This will process all config files and extract their code blocks to ~/.emacs.d/.
3. Configuration Sections
3.1. Early Initialization
3.2. Core Initialization
3.3. Theme and Appearance
3.4. Window Management
3.5. Completion System
3.8. Shell Integration
3.9. Programming Languages
3.9.1. Programming Modules
The programming configuration is modular and includes:
- Loader - Orchestrates all programming configs
- General - Common programming tools (LSP, Magit, etc.)
- Web Development - HTML, CSS, JavaScript, TypeScript
- Python - Python development environment
- Ruby - Ruby development environment