This is the second part of a series on “Configuring Emacs from Scratch”.

You can read the first part here.

In the last part, we customized some defaults of Emacs. But Emacs is not at all limited to customizing the defaults. Emacs has a huge eco-system of external packages that you can install. The default package manager for Emacs is called “package”. Package can fetch packages from multiple sources. Elpa (Emacs Lisp Package Archive) is the source that it uses by default. But users usually add Melpa and Marmalade to their list of package sources.

In this part, we will add a few useful packages and learn how to configure them according to our needs.

Installing packages

First, we will tell package to include Melpa in its list of package archives. To do that, add these lines to your init.el :

The first line tells Emacs to load the feature/file called “package”. This will load functions and variables from package .

The second line is some initialization that package does.

The third line tells package to add melpa to package-archives . In Elisp, a pair can be constructed with (<element 1> . <element 2>) . The last argument t means that the pair must be appended to the list. Without t , the pair would be prepended to package-archives .