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:emacsbin to the PATH

  4. If you want to have a “Open with _G_NU 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.

REGEDIT4  
[HKEY\_CLASSES\_ROOT*shell]

[HKEY\_CLASSES\_ROOT*shellemacsmenu]  
@=“Open with &GNU; Emacs”

[HKEY\_CLASSES\_ROOT*shellemacsmenucommand]  
@=“C:emacsbinrunemacs.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:

(add-to-list 'load-path "c:/emacs/.emacs.d")
(require 'color-theme)
(color-theme-initialize)
(when (display-graphic-p)
  (color-theme-subtle-hacker)
Roberto Selbach
Roberto Selbach
Software Engineer

Ever-learning gopher at HashiCorp.