Installing Emacs

Table of Contents:

Download the Windows Emacs package.

  1. Go to
  2. Download emacs by right-clicking on either emacs-xx.x-bin-i386.tar.gz or emacs-xx.x-fullbin-i386.tar.gz. Install the latest version if you desire. The example below installs version 21.3. Save to a directory that's easy to find.

Unpack the Emacs archive

  1. In order to open up the archive that you have downloaded, you need to have a archive reader. There are various different archive readers that you can use. If you don't have one, you can find some various ones to download here. I give directions on extracting the files using 7-zip, a LGPL archive extractor.
  2. Open up the 7-zip file manager, and navigate to where you saved the emacs archive. You should see something similar to that below. Click on the emacs file so it is bolded.
  3. Hit enter to open the archive.
  4. Rename the directory inside the archive from "emacs-21.3" to emacs, by clicking on the name of the directory, then pressing the F2 button.
  5. Next, click on the extract icon, you should see a window pop up asking where to extract the files to. I have chosen to install emacs to c:\program files\. You can choose anyplace you want to install it, but you must remember where you have installed it for future steps. The installation assumes that you have installed it to c:\program files\
  6. Next, you wait....
  7. After the extraction is done, you can exit out of the 7-zip file manager. If it asks you if you want to change the name of the directory in the archive, tell it no, or cancel (whatever is appropriate).

Installing icons to the Start Menu

  1. Next, run the file c:\Program Files\emacs\bin\addpm.exe. You can do this either by navigating to there using the "My Computer" icon, or you can click on the start menu, select "Run", then type the name of the file. A window should pop up and ask if you want to install emacs, like the one below:

Setting the environmental variables

This step depends on your system. Follow the steps for your system below:
Windows 95/98/ME
  1. Open up the file c:\autoexec.bat in notepad. Double-click does not edit the file, but rather execute the file. The easiest way to do is to first run notepad, then open the file. Add the following line (or edit the line):
            set HOME=C:\
  2. Note that some systems do not like long filenames. If you determine that yours does not, then replace "program files" with "progra~1".
Windows 2000/XP
  1. Right click on the "My Compter" icon, and select Properties. Click on the Advanced tab.
  2. Click on Environmental variables. You should see:
  3. You should create (or edit) the following user variable:
    • Create the HOME variable with the value c:\
  4. Installation of Emacs is now complete. Now you can proceed to Integrating Emacs and R
Windows Vista
  1. Windows Vista has a problem installing the .emacs (or _emacs) file to the root directory (C:\) (It doesn't let you edit it once it is there). Choose a different directory as the home directory. One suggestion would be "C:\Users"
  2. Follow the directions for Windows XP above and create the HOME variable with the value c:\Users\
  3. Installation of Emacs is now complete. Now you can proceed to Integrating Emacs and R
S. Hyde
Last modified: Mon Aug 4 16:27:15 HST 2008