Emacs Config Files
Emacs Lisp
Latest commit d68c7f1 May 23, 2015 Mario Fernandez Update README with directions to new config
Failed to load latest commit information.
defuns Improve isearch backspace May 10, 2015
lang FIX: don't put encoding comments in ruby Aug 20, 2014
machines Correct path for rsense Jun 16, 2013
os Change control and meta keys for osx Jul 9, 2012
vendor Improve find tag for ruby Jun 9, 2013
.gitignore Add TAGS file to ignore list Jun 5, 2013
COPYING Remove executable flag Jan 22, 2012
LAST-SYNCH improved documentation Nov 1, 2010
README.markdown Update README with directions to new config May 23, 2015
TODO Adapt configuration to use el-get as much as possible Sep 21, 2011
appearance.el Move appearance settings to its own file Jan 28, 2012
bindings.el Change binding to use rotate window May 10, 2015
custom.el first version of the emacs configuration Nov 1, 2010
desktop-config.el Add auto restore desktop Jan 24, 2012
dominating-file.el Remove executable flag Jan 22, 2012
el-get-config.el Add ace-window May 10, 2015
eshell-alias first version of the emacs configuration Nov 1, 2010
eshell-utils.el Always set pager Jan 7, 2013
git-config.el Add some helpers for git Jan 20, 2013
helpers.el FIX: add paths for rbenv, change the order in which new paths are add… Nov 19, 2012
ibuffer-config.el Delay loading of ibuffer-vc until necessary Jan 23, 2012
ido-config.el Move ido config to own file, automatically open as root if not enough… Apr 22, 2013
init.el Remove flymake completely, add flycheck stuff for javascript Jun 26, 2013
misc.el Use whitespace-cleanup for whitespace operations May 21, 2013
registers.el Remove executable flag Jan 22, 2012
shell-utils.el first version of the emacs configuration Nov 1, 2010
w3m-config.el first version of the emacs configuration Nov 1, 2010


This configuration is no longer used actively. Instead, I've switched to a configuration based on prelude.

Emacs Configuration

This is a configuration for Emacs. It focuses mainly on programming, with settings for many languages. It also allows custom settings for each OS/Machine.

This configuration started in Jan 2010, derived from the Emacs Starter Kit.


  1. Grab GNU Emacs (24.* version!), use apt or another package manager for linux. For Mac OS X, use some prebuilt binaries (I dislike both Carbon- and Aquamacs). Windows users can get it directly from GNU.

  2. Link the directory with ln -s ~/{emacs_dir} ~/.emacs.d.

  3. Map the CAPS key to control. It is very easy to do in Mac OS X and Linux, you'll need some registry files for windows.

  4. Install el-get as described below.

Byte Compiling

This config tries very hard to avoid loading packages or other resources until they are required, which should keep the startup time to a minimum. That said, it can useful to byte-compile some packages. The command to do that is:

C-u 0 M-x byte-recompile-directory

The vendor folder is automatically compiled at start time, as well as el-get-packages, as they are already compiled. Don't apply this to the common settings, like bindings, misc, or the lang folder. If you change the .el file, the .elc might get outdated and emacs will be using the wrong file.


The init.el file is where everything begins. It's the first file to get loaded. Other relevant files are:

  • helpers.el: Functions and settings used during intialization.

  • defuns.el: Some useful functions for editing and configuration.

  • bindings.el: Some changes to the default keybindings, plus new ones for our custom functions.

  • misc.el: Visual settings, colors, UTF-8 for everything, and some other settings.

  • registers.el: Registers config.

  • (e)shell-utils.el: Settings to use shells inside emacs. Not very much used as I've been using the shell directly.

Configuration for specific packages

  • desktop-config.el: Automatically save/restore the session when restarting emacs.

  • git-config.el: Git related configuration.

  • ibuffer-config.el: Customize the ibuffer window.

  • mode-line-config.el: Customize the status bar.

  • w3m-config: Configuration to use the w3m browser inside emacs.

User/Machine/OS Specific settings

It is possible to add extra configuration, by creating files that are run depending on where emacs is running.

First, a specific configuration is loaded based on the OS that emacs is running in. The files are located in the os folder. One example is configuring the special keys for Mac OS X.

A file based on the hostname of the machine is also loaded. Here I usually set up the size of the emacs window, the font and some specific environment variables.

Lastly, it is also possible to run a configuration file based on the user name. This is currently not used.

Language settings

As this config is oriented towards programming, languages have usually their own config file. They are found in the lang folder. They are centered around setting the correct mode, specific bindings, syntax error highlight and autocomplete facilities. Some of the modes need extra packages or external programs. These are not included in the distribution to avoid bloat. However, each mode has detailed instructions in its header about how to install them. Usually, the config auto-detects the availability, so that it is not necessary to set extra variables, or comment/uncomment things.

Spell correction

Flyspell is used to provide spell correction for text-mode and comments in source files. Depending on the system it might be necessary to install aspell and aspell-dict-en.


It is intended as a replacement of ELPA. To use it, clone it inside the emacs folder with:

git clone git@github.com:sirech/el-get.git

Keep in mind that the el-get repository is just a fork, and has to be synchronized with the original occasionally.

Downloading packages

Packages defined in el-get-config.el get downloaded automatically inside el-get-packages.

It is assumed that a connection to the internet is available. git (>= 1.7) and svn are also required and have to be reachable from emacs.

This process tends to fail a lot the first time it tries to download every package. Just keep trying, specially if errors like End Of Buffer come up.

Some tips to install some packages can be found in the el-get-config.el file itself.


If you are behind a proxy, git might not work. To solve this, depending on the protocol used:

  • http: Set your proxy via

    (setq url-using-proxy t) (setq url-proxy-services '(("http" . (concat host ":" port))))

  • git: You need to define the environment variable GIT_PROXY_COMMAND, and set it to a script that does the redirecting

    (setenv "GIT_PROXY_COMMAND" "git-proxy-cmd")

Where the command can be something like:

nc -x$PROXY_HOST:1080 -X5 $*

The command has to be in a directory added to the PATH in emacs (like ~/bin).


This configuration is used almost daily under Mac OS X, frequently under Linux (Ubuntu), and occasionally under Windows (with help of cygwin), for general text editing, and for programming. In case of problems, running the last version of everything usually helps.

Resources for Emacs

Some interesting places to learn more about emacs: