HN
Today

Two Years of Emacs Solo: 35 Modules, Zero External Packages, and a Full Refactor

This Emacs user spent two years meticulously crafting a configuration, Emacs Solo, with zero external packages, proving the surprising depth of built-in Emacs capabilities. The author details an architectural refactor and 35 custom modules, demonstrating how to achieve a powerful environment with complete personal control. This resonates with the HN crowd's desire for understanding and mastery over their tools, avoiding external dependencies for robust, breakage-free workflows.

42
Score
1
Comments
#1
Highest Rank
11h
on Front Page
First Seen
Mar 10, 1:00 AM
Last Seen
Mar 10, 11:00 AM
Rank Over Time
11112211336

The Lowdown

The author, celadevra_, presents "Emacs Solo," a two-year journey into maintaining a highly customized Emacs configuration that strictly adheres to a "zero external packages" rule. This ambitious project aims to deeply understand Emacs's native capabilities, ensure configuration stability across releases, and avoid the common pitfalls of managing numerous third-party dependencies. The core philosophy centers on maintaining complete control over the environment, enabling the author to understand and fix issues precisely.

  • Architectural Refactor: The configuration was split into two distinct layers:
    • init.el: Dedicated to configuring only built-in Emacs features, designed for easy modularity and sharing without external dependencies.
    • lisp/: A directory housing 35 self-contained, custom-written Elisp modules. These modules act as minimalist reimplementations of functionalities typically provided by popular external packages, focusing on "good enough" for daily use.
  • Core Emacs Configurations: init.el meticulously configures a vast array of Emacs's native features, from general settings like keybindings, window management, and file handling to more complex subsystems like version control (vc), the LSP client (eglot), and the icomplete completion system, often leveraging upcoming Emacs 31 features.
  • Custom Modules (The Extras): The lisp/ directory contains 35 bespoke modules, each a small Elisp file (often under 200 lines) reimplementing specific functionalities. Examples include custom themes, a minimal modeline, enhanced navigation, a configurable formatter, Git diff gutters, quick window switching, AI assistant integration, container management, and file type icons for Dired, Eshell, and Ibuffer.
  • Emacs 31 Integration: The author highlights numerous features from the upcoming Emacs 31 release that are either already integrated or anticipated to simplify existing polyfills, demonstrating a forward-looking approach to configuration.
  • Key Learnings: The project taught the author that Emacs is far more capable out-of-the-box than commonly perceived, that writing custom Elisp is the best way to truly learn the language, that small and focused modules are highly effective, and that contributing upstream is a valuable endeavor.

In conclusion, Emacs Solo stands as a testament to the power and flexibility of Emacs itself, demonstrating that a productive and modern development environment can be achieved with full control and understanding, without relying on a large external package ecosystem. It's a compelling case for deep engagement with one's tools and a detailed guide for others curious about Emacs's native potential.