Recently in the learning of Windows Emacs, encountered a lot of problems, such as what home directory,. emacs configuration file,. El file, through a few days of repeated pondering, finally have a feeling. I think not only I, many people have encountered these problems, now summarized as follows, for the needs of friends reference. 1, download to this URL can be downloaded to the Windows version of Emacs: http://ftp.gnu.org/pub/gnu/emacs/windows/only need a compressed document, such as Emacs-22.3-bin-i386.zip
2, installed in the D packing directory to create a new folder, named Emacs22.2 (also can be other paths, with personal preferences), the Emacs-22.2-bin-i386.zip files extracted into this directory, so that in d:/emacs22.2/under the bin, Directories such as TEC, info, Leim, Lisp, Site-lisp.
Double-click on the Addpm.exe in the Bin folder to install, the GNU Emacs/emacs link will be generated from the Start menu and click this link to activate Emacs. You can also double-click the Runemacs.exe in the Bin folder to start. Note that there is a file in the bin directory that is Emacs.exe, double-clicking it can also be started, but a console window will appear
3, modify the registry to open the registry, find Hkey_local_machine/software/gnu/emacs (if not manually add the item), under this key to add a string value, the name is home, the value is d:/emacs22.2. The goal is to make d:/emacs22.2 the home path of Emacs (the legendary Home path, where you will often see "home directories", "Home directory", and so on).
4. Create the. emacs.d directory and. Emacs files believe that the. emacs.d directory and. Emacs files are a long-lasting problem, but there is an easy way to solve this problem. To activate Emacs, click on the Options menu with your mouse and click on one or two options, such as click on active region highlighting and click Save Options. Don't worry about what you're going to spoil, so the goal is to have Emacs create the. EMACS.D directory and the. emacs file Automatically! Observing the last line of your Emacs window, do you see "wrote D:/emacs22.2/.emacs"? If that's right, 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/directory to produce these two things?
5. Load the. El file in the Lisp directory with the Lisp source file (*.el) and the compiled Lisp file (*.ELC), you can also place your. El file in this directory 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 directory, and then open the. emacs file to insert a sentence (require ' ABCD) on it (including parentheses, no extension. el).
If you do not like Lisp folder, you can also create a new one yourself, such as in the home directory to build a folder called XYZ, and then put Abcd.el in the XYZ directory, in the. emacs file Insert the following two sentences: (Setq Load-path (cons "~/xyz" Load-path)) (Require ' ABCD) the first sentence tells Emacs to load your XYZ directory first, and then load Abcd.el in the second sentence. Note that "~/" is a Linux system usage that represents the home directory. If you and I are learning the Sams Teach yourself Emacs in Hours book, I think you need to sams-lib.el this file! Can be downloaded to this URL: http://www.cs.virginia.edu/~wh5a/personal/Emacs/find sams-lib.el after right click "Save Target as" on it!
Finally, there is a matter of confusion, in addition to Lisp there is a site-lisp directory, I put Sams-lib.el respectively in these two directories, found that the effect is the same, do not know what the difference between the two directories?
Installation and configuration of Emacs under Windows