How to set up Emacs on Windows

Just so I have it documented somewhere for future reference, here’s how to quickly set GNU Emacs up on Windows.

  1. Download it from http://ftp.gnu.org/gnu/emacs/windows/
  2. Unzip it to, say, C:\emacs or something like that
  3. Set the environment variable HOME to C:\emacs and include C:\emacs\bin to the PATH
  4. If you want to have a “Open with GNU Emacs” option on the context menu, just create a registry file (call it emacs.reg or whatever.reg) with the contents below and double-click it to import it into the registry.
1
2
3
4
5
6
7
8
REGEDIT4
[HKEY_CLASSES_ROOT\*\shell]
 
[HKEY_CLASSES_ROOT\*\shell\emacsmenu]
@="Open with &GNU Emacs"
 
[HKEY_CLASSES_ROOT\*\shell\emacsmenu\command]
@="C:\\emacs\\bin\\runemacs.exe \"%1\""

Et voilà! As well, for my preferred colour scheme, we need to use color-theme from http://www.nongnu.org/color-theme/ and set it up in your .emacs file:

1
2
3
4
5
(add-to-list 'load-path "c:/emacs/.emacs.d")
(require 'color-theme)
(color-theme-initialize)
(when (display-graphic-p)
  (color-theme-subtle-hacker)