HOWTO: Emacs: Windows Installation
I have deleted The GitHub repositories referred to in this post; see Clearing the deck for details.
This post is part of my HOWTO series on Emacs.
Thanks to Nigel Thorne for feedback and bug reports on this HOWTO.
Installing Emacs on Microsoft Windows is a little more convoluted than on Linux, because a lot of the functionality we take for granted on most modern Linux distros is missing from Windows.
- Download Emacs 22.3 from http://ftpmirror.gnu.org/emacs/windows/emacs-22.3-bin-i386.zip (this URL will find the closest GNU mirror to you).
- Extract the
emacs-22.3folder inside the ZIP file into yourProgram Filesdirectory (Program Files (x86)on Windows 7). (I suggest using a free third-party ZIP utility like FilZip - credit to Joseph Iscaro for bringing FilZip to my attention).
You should be left with a directory called something likeC:\Program Files\emacs-22.3that contains the following:
bin etc info leim lisp site-lisp BUGS COPYING INSTALL README README.W32
- Create a per-user environment variable (instructions for Vista / Windows 7 and XP) called
HOME, with the value%USERPROFILE%. Emacs uses theHOMEenvironment variable to work out where to store your settings, and by defaultHOMEisn't set on Windows.
You can test that your new environment variable is set correctly by opening a Command Prompt and typing:
echo %HOME%You should see something like:
C:\Users\duncan... in response.
- Add Emacs to your start menu by opening
Program Files\emacs-22.3\bin(Program Files\emacs-22.3\binon Windows 7), and double-clicking onrunemacs.exe. Once Emacs has opened, close it, then right-click onrunemacs.exeand choosePin to Start Menu. (You could have pinnedemacs.exebut then you'd get a DOS box opening every time you ran Emacs from the Start Menu).
In the following steps, we'll get my personalised Emacs configuration and plugins from GitHub. You could skip them as I'll be going through how it all works in detail in subsequent posts, but for now if you want all the Emacs Goodness (TM) and you want it now! then you should follow these steps. - Download and install Git from http://msysgit.googlecode.com/files/Git-1.6.5.1-preview20091022.exe. When installing, choose Unix line endings but accept all other defaults. (Thanks to the msysgit team for this - up until recently installing Git on Windows was a truly painful experience).
- Open Git Bash from the Start Menu, and enter the following commands:
cd ~/ git clone git://github.com/duncan-bayne/duncans_emacs.git duncans_emacs ln duncans_emacs/emacs .emacs ln -s duncans_emacs/emacs.d .emacs.d
Note that if the
git clonefails, you might be behind a firewall that prevents Git traffic; if so, try usinghttp://instead ofgit://.
With installation complete, you can now verify that all is well by running Emacs from the Start Menu (just click on the runemacs.exe shortcut we created in step 4. You should be met with a window that looks a lot like this one:

Now might be a good time to introduce you to your first Emacs command, save-buffers-kill-emacs, which prompts you to save any open buffers and then exits.
You can run this command by pressing Crtl-x, then Ctrl-c. Or you can run it manually by typing Alt-x then typing save-buffers-kill-emacs and pressing enter (you can use tab-completion to avoid typing the entire command).
That's all there is to it. Now that I've covered installing Emacs, I'll soon get started with the meat of the series - how to improve your productivity as a developer using Emacs.



Recent comments
1 week 1 day ago
3 weeks 3 days ago
3 weeks 6 days ago
11 weeks 1 day ago
15 weeks 5 days ago
31 weeks 15 hours ago
31 weeks 20 hours ago
37 weeks 3 days ago
37 weeks 3 days ago
37 weeks 4 days ago