Emacs Starter Kit for the Social Sciences
To accompany the Choosing Your Workflow Applications paper, here is a version of Phil Hagelberg’s emacs starter kit by way of Eric Schulte’s Org-Mode implementation. I’ve made some further tweaks and added some tools of particular use to social scientists. The starter-kit includes up-to-date versions of Org-Mode, Emacs Speaks Statistics, AucTeX, Magit, Markdown mode, Yasnippet, and assorted other useful bits and pieces. If you use Mac OS X, the kit should work immediately with the current version of Emacs (Emacs 24).
The Obligatory Screenshot, showing the Solarized (Dark) Theme, which the Kit defaults to.
Solarized (Light) Theme. Some other themes are also included, notably a Zenburn-like one.
What’s the motivation for the starter kit? Emacs is a very powerful editor but it is less useful out-of-the-box than it might be, in part because many convenient settings and modes are not activated by default. The starter kit is a drop-in set of nice default settings. The idea is for you to be able to download GNU Emacs, put the starter kit into ~/.emacs.d/ (or the equivalent on Windows, see below), and get to work. If you already use Emacs and have a .emacs file or ~/.emacs.d directory, the starter kit is designed to replace them, while leaving a place for you to easily append your own customizations.
The starter kit is designed to be used with GNU Emacs (version 24 or later is required). It will not work with Aquamacs without some modification.
Documentation
Commentary and documentation is provided inside the kit’s .org files. You can read a nicely-formatted version of this documentation here.
Installation Instructions (Mac OS X)
Prerequisites
0.0 Install Mac OS X’s suite of Developer Tools. These came with your Mac on an install DVD of their own. Alternatively, download Xcode 4 from the Mac App Store. Or, if you do not want the entire 4GB of the development environment, go to Apple’s Developer Site, login with your Apple ID and download the Command Line Tools for Xcode, which gives you the compiler tools you’ll need and weighs in at just 175MB or so.
0.1 Get Emacs. The starter kit now requires Emacs 24. Download Emacs here, and make sure you choose the most recent Emacs 24 pretest. This version is not yet officially released, but the pre-release builds are quite stable. Alternatively you may compile it yourself. Here is a link to the most recent pretest if you want to do that.
0.2 Install a Modern TeX Distribution. You will need this for AucTeX, below. If you are using OS X, download MacTeX here and install it. For Windows and Linux, download and install TeX Live.
0.3 Install Git. Either compile it from source if you know what you’re doing or install it directly.
0.4 Note your user name or the name of your computer. If you don’t know either, launch emacs and do one or both of,
C-h-v user-login-name
C-h-v system-name
Alternatively, open the terminal and do
$ whoami
for your user name and
$ hostname
for the system name. You will need to know your login name to activate the final customization file properly. You can use the system name as well (or instead) but it’s optional.
Setup
1. If they’re already present, back up your .emacs and .emacs.d/ directory. Then delete the .emacs file. (See below for details on where to put any customizations you wish to add yourself.)
2. Clone the starter kit into ~/.emacs.d. From the terminal:
$ git clone git://github.com/kjhealy/emacs-starter-kit ~/.emacs.d
(On Windows you must clone the repository into Documents and Settings/%your user name%/Application Data/. For more details on the location of init files and directories under Windows, see the relevant sections of the Emacs for Windows FAQ. I do not have access to a Windows machine, so I am afraid I can’t answer any Windows-related questions about installing or running Emacs or the Starter Kit.)
3. Pull in some extra bits of the kit, notably ESS (Emacs Speaks Statistics).
$ cd ~/.emacs.d/ $ git submodule init $ git submodule update
4. Inside the file kjhealy.org, change the paths to any BibTeX databases as described at the top of that file.
5. Finally, change the name of the starter kit’s kjhealy.org to that of %your-username%.org or %your-systemname%.org, based on the information you noted in 0.3 above. These files are where you can add in any of your own existing or future customizations without breaking the starter kit’s overall setup.
6. Launch Emacs.
When you first start Emacs after installing the starter-kit, it will try to contact the ELPA repository in order to download and install some additional packages. Please be patient with it. If it doesn’t get everything first time around, just quit and relaunch Emacs, and it will try again.
7. (Optional.) Once Emacs is up and running, do M-x starter-kit-compile to byte-compile the kit’s files, for slightly faster loading.
Notes
1: AucTeX on other platforms. If you are on Windows, you may need to get the precompiled version of AucTeX. I am not sure if the Package system can compile it on Windows. It may: I just have not been able to test it.