Recently in the study of Windows Emacs, encountered a lot of problems, such as what home folder,. emacs configuration file,. El file, through a few days of repetition, finally have a feeling. I think not only I, very many people have encountered these problems, now summed up for example, for the needs of friends to participate.
1. Download
To this URL to be able to download to Emacs's Windows version number: http://ftp.gnu.org/pub/gnu/emacs/windows/
Only need a compressed document, such as Emacs-22.3-bin-i386.zip
2. Installation
In the D packing folder to create a new folder, named Emacs22.2 (also can be other paths, depending on personal preferences), Emacs-22.2-bin-i386.zip files extracted into this folder, so in D:/emacs22.2/bin, Tec , info, Leim, Lisp, Site-lisp and other folders.
Double-click the Addpm.exe in the bin directory to install it, and after installation it will generate the GNU Emacs/emacs link in the Start menu and click this link to start Emacs. You can also double-click the Runemacs.exe in the Bin directory to start. Note that there is a file in the bin directory that is Emacs.exe, and double-click it to start, but a console form appears
3. Change of registration Form
Open the Register and locate the Hkey_local_machine/software/gnu/emacs (assuming no entries are added manually), add the string value under this key, the name is home, and the value is d:/emacs22.2. The goal is to make d:/emacs22.2 the home path to Emacs (the legendary Home path, where you will often see "Home folders", "Home directory", and so on).
4. Create the. emacs.d folder and the. emacs File
Believing that the. emacs.d folder and. emacs files are very long-suffering problems, there is actually an easy way to solve this problem. To activate Emacs, click on the Options menu with your mouse and click on the one or two options, for example, click Active Region highlighting and click Save Options. Don't worry about what you're going to ruin, it's the purpose of Emacs to create the. emacs.d folder and the. emacs File! Observe the last line of your Emacs form, do you want to show "wrote D:/emacs22.2/.emacs"? Assuming that's the right thing to do, when you choose the Save options, Emacs generates the. emacs file under the home path and writes the configuration information into this file. Now look at your d:/emacs22.2/folder to see if these two items are generated?
5. Load the. El file
The Lisp folder holds the Lisp source file (*.el) and the compiled Lisp file (*.ELC), and you can put your. El file in this folder later, and then insert the related statement in the. emacs file. For example, you have a file called Abcd.el, copy it to the Lisp folder, and then open the. emacs file to insert a sentence (require ' ABCD) to be able to (including parentheses, do not need to extend the. El).
Suppose you don't like the Lisp folder, you can also create a new one yourself, for example, in the home folder to build a folder called XYZ, and then put Abcd.el in the XYZ folder, insert the following two sentences in the. emacs File:
(Setq Load-path (cons "~/xyz" Load-path))
(Require ' ABCD)
The first sentence tells Emacs to load your XYZ folder first, and then load the second sentence into Abcd.el. Note "~/" is a way to use the Linux system, which represents the home folder.
Let's say you're learning "Sams Teach yourself Emacs Hours" as much as I do, and I think you need to sams-lib.el this file! To be able to download this URL:
http://www.cs.virginia.edu/~wh5a/personal/Emacs/
After finding Sams-lib.el, right click on "Save Target as" to be able!
Finally, in the next thing puzzled, in addition to lisp another Site-lisp folder, I put Sams-lib.el respectively in these two folders, found that the effect is the same, do not know how the two folders are different?
Installation and configuration of Emacs under Windows