Blog‎ > ‎

Installing Emacs in Windows

posted Jan 7, 2015, 3:13 AM by Juan Jose Garcia-Ripoll   [ updated Jan 7, 2015, 3:13 AM ]
So far I have been using EmacsW32, a patched but now outdated version of Emacs that self-installs in Windows. More recently I have started using a stock Emacs, compiled and built in 64-bit mode using MSYS by Fabrice Popineau The steps to follow are pretty simple:
  1. Download the latest ZIP file and unpack it under "C:\Program Files". Simply drag the Emacs folder to that location from the window that opens when you click on the downloaded archive.
  2. Add the "C:\Program Files\Emacs\bin" directory to your path. For that go to "Control Panel" and in the search box type "environment variable". An option will open that says "Edit environment variable for this account". Click on it and prepend "C:\Program Files\Emacs\bin;" with the semicolon and without the double quotes to the content of the "Path" box.
  3. Add an icon to run emacs. For that enter the "C:\Program Files\Emacs\bin" directory and, right-clicking on "emacsclientw.exe" select "Add to Start".
  4. Finally, I like to associate files to Emacs. You need to open a command window by typing Window+S, then writing cmd in the search box and then pressing Ctrl+Shift+Enter. From within the window, copy the following commands
ftype EmacsFile="%ProgramFiles%\Emacs\bin\emacsclientw.exe" -n "%%1"
assoc .c=EmacsFile
assoc .h=EmacsFile
assoc .cc=EmacsFile
assoc .hpp=EmacsFile
assoc .tex=EmacsFile
assoc .bin=EmacsFile
assoc .el=EmacsFile
assoc .f=EmacsFile
reg.exe add "HKCR\EmacsFile\defaulticon" /ve /d "%ProgramFiles%\Emasc\bin\emacs.exe" /f

This should be it