How I would start out with Emacs now…

I’ve been toting more or less the same emacs config file around for most of 20 years. I have occasionally sliced it up into multiple files—and then inevitably reintegrated it back into one file—and I have certainly added to it, removed from it, etc. The fundamental way I approached Emacs’ configuration, though, always stayed the same—a bunch of require statements, a gigantic setq invocation, a few miscellaneous functions copied from elsewhere, etc.

For most of that time I’ve also used , and once they existed, I still resisted the idea of using the emacs package facilities in preference to Debian packages—of which I’ve made a couple, but it’s a non-trivial amount of work; someone should write dh-make-emacs—so it had to be something that was really important to me if I was going to go to the trouble of getting it installed. So I didn’t install much.

What I’m trying to say is that I’ve led a fairly impoverished Emacs life.

About a month ago, I decided that that was stupid. The specific catalyst was that I wanted to take advantage of features in a newer version of haskell-mode, but packaging that—especially doing so in a way that I could easily take development snapshots—would have been an almighty amount of work; so I decided to capitulate, and move to using Emacs’ package facilities, and ELPA and MELPA and just go whole-hog.

This has made a huge difference in my productivity—I am taking such better advantage of Emacs now it startles me, and, even more astonishing, my init.el file is far more coherent and comprehensible, so much that I cannot imagine a reason to split it up at this point, even as I try out additional packages.

I’ll probably write more about specific stuff later—assuming I feel like I have something to contribute beyond, say, mere fanboyishness—but I wanted to lay out how I would approach bootstrapping from nothing, knowing what I know now.

My very first step would to be to get use-package installed. This lives in MELPA, so it does require a true bootstrapping step. I would pop open a *scratch* buffer, type

(progn (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
 (package-list-packages))

Use ^X^E to run it, and install use-package.

Having bootstrapped use-package, my initial init.el would start out with:

;; Using packages exclusively now(package-initialize)

;; Easy correct loading and configuration support(require 'use-package)

(use-package package  :config  (progn    (add-to-list 'package-archives '("marmalade" . "https://marmalade-repo.org/packages/") t)
    (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)))

Almost everything else will end up in a use-package invocation for its associated package.