The Emacs configuration directory.
Clone the root of this version-controlled repository to a place where Emacs can find the init.el
file, e.g. ~/.config/emacs
.
bin/
- Scripts used by Emacs; add this to thePATH
environment variableetc/
- Startup and configuration files for Emacs packagesetc/tempel/
- Used by tempel, storing templates
init.d/
- Symlinks to Elisp package sources stored underlisp
lisp/
- Elisp package sourceslisp/archive/
- Unused code archive kept for reference
straight/
- Used bystraight
straight/repos/
- Store package repositories of source codestraight/versions/
- Store version pinning info
tree-sitter/
- Tree-sitter filesvar/
- Emacs package data files
init-*.el
- configures a package manager.linux-gui.el
- configures GUI sub-components in Linux.maj-*.el
- configures a major mode and the related features used within it.optimizations.el
- sets up various optimizations for Emacs.subsys-*.el
- configures an Emacs subsystem not neatly implemented as a major mode.themes-*.el
- configures themes.
The Emacs starts by loading early-init.el
and then init.el
. This section describes the architecture of the init.el
file.
The init.el
makes heavy use of use-package
with straight
, configured in lisp/init-straight.el
.
Use :straight nil
to avoid pulling the source:
(use-package builtin-package
:straight nil
…)
The Elisp sources are in the lisp/
directory. Those actually loaded by init-loader
are symlinked in the init.d/
directory, in (mostly) ASCII order.
To set up symlinks, use init.d/symlinks.sh
:
./init.d/symlinks.sh # create all sysmlinks
./init.d/symlinks.sh -d # delete all symlinks
See the Key Binding Conventions section of the GNU Emacs Lisp Reference Manual.
In a typical Linux system that I use, the startup time is about 1.5 - 2.0 seconds on the first launch and 1.0 - 1.5 seconds thereafter. The init.el
is written for readability and maintainability, but a few strategies are maintained to minimize package loading time. The following resources may offer useful tips (in Japanese):
- Emacs の起動時間を“詰める” | Emacs JP
- Emacs の起動時間を”詰める” (free book version)