My System

My system is a set of meta-packages for Emacs called 'modules' which can be individually installed.

Gitlab repository

1. Setup

  1. Add my archives and MELPA to your package archive list

    Add the following lines to your init file and evaluate them.

    (require 'package)
    (add-to-list 'package-archives '("my-modules" . "https://modules.amygrinn.com/"))
    (add-to-list 'package-archives '("amy" . "https://packages.amygrinn.com/"))
    (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
    
  2. Refresh package list

    Use the command M-x package-refresh-contents after adding my modules to the package archive list for the first time.

    The version of each module (1) is not likely to change but modules may be added and deleted at any time.

  3. Install modules as packages

    All my modules are prefixed with 'my-'. Install them as you would any other package: via use-package statements, M-x list-packages, or any other way.

    To update a module, use the command M-x package-reinstall.

  4. Customize my-system

    My modules sometimes provide options to the my-system group. Customize all available options with M-x customize-group RET my-system.

2. Configuration

Use the following Emacs command to launch my config.org file, which can be tangled to configure common software configuration files, including for Emacs.

M-x browse-url-emacs RET https://modules.amygrinn.com/config.org RET

3. Modules

4. Discussion

4.1. Auto-requiring

A lot of my modules require themselves upon installation. This means there is no further setup needed, simply installing the module will apply the changes to Emacs. It also means that modules must be deleted entirely in order to be disabled, via M-x package-delete.

4.2. Version numbers

All of my modules' version numbers are set to 1 as described above. This signifies that there is only one valid and supported version available: the latest version of the file. It also signifies that every upgrade should be considered a breaking change.

Modules also won't be updated automatically via M-x list-packages or M-x package-upgrade-all. They must be manually reinstalled with M-x package-reinstall.

4.3. Why?

  1. Why modules?

    Modularizing my config allows me to install only what I need on different devices.

  2. Why packages?

    I decided to write my modules as packages for a few reasons, but most core to the decision is that Emacs package files naturally provide a skeleton for effective documentation and consistent organization.

    Packages also provide an easy way to handle dependency management, (native-)compilation, and a familiar interface through commands like M-x package-install-file or M-x package-install-from-buffer.

  3. Why package archive?

    From a user perspective, package archives are easier to set up than git repositories and available on more systems. It's also easier to upgrade from within Emacs and it allows modules to depend on other modules.