Installing Emacs on Windows 95/98/2K/NT/ME/XP/Vista/Windows 7
August 16, 2009
Many people have successfully installed emacs on Windows 95, 98, 2K, NT, ME, XP, Vista, and Windows 7 using the instructions below. [I have not tried Vista or Windows 7 myself yet with these instructions, but Rafael have - successfully.]
Disclaimer: This page is being maintained mainly for my students. Use these instructions at your own risk if you are not a student taking one of my classes. There is no warranty in any form or shape whatsoever! There is no guarantee that these instructions are up-to-date although I will update them for my students on an on-going basis. With that understood you may continue with the rest of this page if you choose to accept these terms.
Emacs version 23.1: This was the latest version available at the time of this writing (August 16, 2009).
Follow these steps to download and install Emacs on your windows machine. There is no room for creativity here; you must follow the directions exactly - every single word.!.
- Pick the drive and a folder in which you want to install Emacs. I'll assume that it is C:\emacs, but you can choose a different one. If you choose a different drive or a different folder, you'll need to adapt the directions below accordingly.
- Create an empty folder C:\emacs.
- Go here and download the following into the folder that you created above:
emacs-23.1-bin-i386.zip 30-Jul-2009 01:10 39M
At this point, you should have one file named emacs-23.1-bin-i386.zip of about 39 megabytes in the C:\emacs folder. Check to be sure.
- Click on that file using Windows Explorer to extract files from that archived file. Your extracted files should go into C:\emacs folder. Assuming that you already have a program installed on your machine that knows how to unpack the zipped file, you can click on it to extract the files. Once extraction is done, you will see a folder named emacs-23.1 under C:\emacs. Under emacs-21.3, you will see other folders including bin, etc, info, etc. At this point, you have downloaded and placed the files in the right places.
- Next, you will download a file that will customize your emacs a little so that it makes your editor screen easier to read with colors recognizing some standard file types that you will be editing, e.g., a Java program file. Download init.txt to C:\emacs\.emacs.d\init.txt by right-clicking on the link. Yes, there is a folder named .emacs.d when emacs is installed. (if you don't see this folder, it may be because your folder options are hiding the 'dot' files, specially for Vista. Unhide them. If that does not help, go ahead and proceed without worrying about init.el altogether.) Download init.el into that folder. Now, rename init.txt to be init.el. (Sorry about this extra step - it is due to the local peculiarity that I don't want to explain.)
- Depending on the operating system that you use, choose one of the following paths:
set HOME=C:\emacs\
You will probably find autoexec.bat on your C: drive. Edit it with Notepad. You can't edit it by clicking on it. Start Notepad and then open it with the File menu.
2K, ME, XP, Vista, Windows 7: add HOME as an environment variable. Follow Start > Settings > Control Panel > System. Then select Advanced followed by Environment Variables. Then, add HOME as a user variable with its value C:\emacs\.
NT: It works like 98 with the autoexec.bat file. I suspect it would work like 2K as well, but I have not tried it that way myself.
- Restart your machine.
- At this point, you might want to create an icon on your desktop for the Emacs that you just installed. Go to the C:\emacs\emacs-21.3\bin folder using Windows Explorer. There you will find a file named runemacs.exe. Create a shortcut to the desktop so that you can use it to run Emacs from the desktop. Now, you should be in business! If it doesn't work, you made a mistake in one of the steps above. Double and triple check.
- After you create the shortcut, you might want to change the default 'Start in' folder. Change it to whatever you like through the Properties menu of the icon. Your emacs will use that folder as the base folder when it looks for a file to edit.
- If you want to clean up a little, you may delete emacs-23.1-bin-i386.zip at this point. You still need .emacs.d and emacs-21.3 in the C:\emacs folder though.
- To learn how to use Emacs, try Emacs Tutorial that you can find under the Help menu in the Emacs window. Or, if you want a simpler version, try this tutorial that I wrote for my students.
- [Only optionally because I want this to be a simple page that shows just enough to get started.] To learn how to customize Emacs or simply to see more help on it, try Emacs Help Guide by Hemant Kumar. (That site will talk about .emacs file, which is the unix/linux version of init.el.) I am sure there are many other sources of information on emacs out there, e.g., GNU Emacs FAQ For MS Windows, but Paul Fiorillo found this site.