Skip to content

okomestudio/emacs.d

Repository files navigation

emacs.d

The Emacs configuration directory.

Repository structure

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 the PATH environment variable
  • etc/ - Startup and configuration files for Emacs packages
    • etc/tempel/ - Used by tempel, storing templates
  • init.d/ - Symlinks to Elisp package sources stored under lisp
  • lisp/ - Elisp package sources
    • lisp/archive/ - Unused code archive kept for reference
  • straight/ - Used by straight
    • straight/repos/ - Store package repositories of source code
    • straight/versions/ - Store version pinning info
  • tree-sitter/ - Tree-sitter files
  • var/ - Emacs package data files

Elisp file naming convention in lisp/

  • 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.

init.el architecture

The Emacs starts by loading early-init.el and then init.el. This section describes the architecture of the init.el file.

Use of straight-use-package

The init.el makes heavy use of use-package with straight, configured in lisp/init-straight.el.

Initializing built-in package

Use :straight nil to avoid pulling the source:

(use-package builtin-package
  :straight nil
  …)

Use of init-loader

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

Key bindings

See the Key Binding Conventions section of the GNU Emacs Lisp Reference Manual.

Miscellaneous topics

Improving startup time

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):

About

The Emacs configuration directory.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published