This repository has been archived on 2022-11-18. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2019-04-13 19:16:03 +02:00
emacs-deferred@0f2af90a70 Add emacs-deferred as submodule 2017-09-09 22:49:40 +01:00
emacs-racer@e6a0f35c38 Add emacs-racer as submodule 2017-09-10 14:28:07 +01:00
emacswiki Import emacswiki packages no longer provided by MELPA 2018-10-28 23:35:48 +00:00
emodule Absorb emodule and update README 2019-04-13 19:16:03 +02:00
initial-buffer Create new splash screen 2019-04-13 19:16:03 +02:00
modules Add some useful keybindings 2019-04-13 19:16:03 +02:00
snippets/org-mode Use snippets 2018-05-11 21:58:49 +01:00
themes Fix doom-modeline bar colour 2019-04-13 19:16:03 +02:00
.gitignore Update gitignore 2018-02-06 21:52:21 +00:00
.gitmodules Add emacs-racer as submodule 2017-09-10 14:28:07 +01:00
CHANGES.rst Update changelog 2019-04-13 19:16:03 +02:00
init.el Create new splash screen 2019-04-13 19:16:03 +02:00
LICENSE.txt Add a README, license, and a changelog 2017-09-03 15:36:29 +01:00
plantuml.jar Add plantuml and ansi-color in compilation-mode support 2018-01-29 13:23:58 +00:00
README.rst Absorb emodule and update README 2019-04-13 19:16:03 +02:00
roadmap.org Add some useful keybindings 2019-04-13 19:16:03 +02:00

.emacs.d
========

My personal Emacs configuration.

Installation
------------

Just clone this repository into your home directory:

::

   git clone https://github.com/Wojtek242/.emacs.d ~/.emacs.d

This configuration uses the `Source Code Pro`_ font.  If you do not have it
installed and it isn't available through your distribution you can install
the font by running

::

   git clone https://github.com/adobe-fonts/source-code-pro.git --branch release ~/.local/source-code-pro
   sudo cp ~/.local/source-code-pro/OTF/*.otf /usr/local/share/fonts

After cloning the repository and waiting for all packages to install on the
first startup you will also have to run the following command from within Emacs
in order to get all the icons used by the modeline

::

   M-x all-the-icons-install-fonts

Rust support
------------

If you would like to use this configuration with the Rust programming language
you will want to also clone the submodules to get the patched version of Racer
and Deferred so when cloning remember to use the ``--recursive`` option

::

   git clone --recursive https://github.com/Wojtek242/.emacs.d ~/.emacs.d

You will also have to install the ``racer`` (available on crates.io) and the
Rust standard library sources. Furthermore, you will need to set the
environment variable ``RUST_SRC_PATH`` to point at this source directory.

Package Management
------------------

This ``.emacs.d`` uses its own small framework for package management located
in the ``emodule`` directory.  Its operation is heavily inspired by Spacemacs_,
but is much smaller with fewer features and thus simpler.

The purpose of using such a package manager is to ensure that all packages are
always installed before any configuration happens.  Furthermore, it will also
remove all unused packages and manage upgrades and backups.

Package configuration happens in the ``modules`` directory.  A file called
``MODULE.el`` corresponds to an individual ``MODULE``.  Inside each module
file, all the pre-requisite packages must be defined in a variable called
``emodule/MODULE-packages`` and all package configuration must be done in a
single function called ``emodule/MODULE-init``.  Each module must also be added
to the ``emodule/init`` call in the ``init.el`` file.

The ``emodule`` package manager runs during every startup. It will first ensure
all packages are installed before it runs any ``init`` functions so it is safe
to write configuration for packages that depends on other packages without any
concerns about ordering. This applies even if the configuration is spread
across multiple modules.

When Emacs is first launched with this configuration it will download all
the ``Elpa`` and ``Melpa`` packages that it needs so the first startup takes
much longer to complete.

Upgrades are supported and can be initiated either from the home screen or by
calling ``emodule/upgrade``.  I don't like tracking ``elpa`` with git as it
introduces a lot of code churn and makes analysing diffs, especially between
distant commits, very difficult. Instead, on each upgrade the ``elpa``
directory will be backed up to ``elpa.tar.xz``.  You can restore the last
backup by calling ``emodule/restore``. This repository should always contain a
functional backup of ``elpa``.

Theme
-----

The theme in use started with the ``underwater`` theme and has been heavily
modified, with inspiration from the Spacemacs_ theme, to add support for all
new faces introduced by the installed packages.  The code setting up the theme
is quite messy.  It is my plan to simplify it one day.

The theme files are located in ``themes``.

Stability
---------

I have been using this configuration at work and at home for many months now
which helped flush many bugs.  It has been pretty reliable, but suffers from
the occasional glitches which I think are more due to the limitations of
Emacs and the packages used than errors in my configuration.

.. _Spacemacs: http://spacemacs.org/
.. _`Source Code Pro`: https://github.com/adobe-fonts/source-code-pro