Record the configuration of Emacs under Window

Source: Internet
Author: User

Today, reloading the WIN7 64-bit new system, the discovery Emacs failed to load the previous plugin. Search on the Internet to remember, emacs default read configuration file in the C drive, in this original configuration file also need to add some path conversion statements to go to the user's own configuration file.

So reconfigure, OK. But in the middle still encountered some twists and turns, so want to record this process, lest the future detours.

First we need to download the Windows version of Emacs, official website:
http://ftp.gnu.org/pub/gnu/emacs/windows/
For example, I downloaded: emacs-24.3-bin-i386.zip
After extracting the hard drive, there is a Addpm.exe, double-click to run it.

Under Windows It is not possible to manually build the. emacs file, you can open Emacs and then under Options, casually
Pick an option such as: Paren Match highlighting then click Save Options
You can see the following tips
Wrote C:/Documents and Settings/administrator/application Data/.emacs
The. emacs file has already been generated.
In order to reuse the configuration and plugins later, we need to change the plugin import path in C:\Documents
and Settings\administrator\application Data\.emacs Add the following code

1 (setenv "HOME" "d:/emacs-24.3")2 (setenv "PATH" "d:/emacs-24.3")3 ;; Set Path 4 (setq default-directory "~/")56 (load-file "D:/emacs-24.3/.emacs")

As if using the registry, you can also specify Emacs's work home directory--Create a GNU under HKEY_LOCAL_MACHINE, and then create an Emacs subkey, which establishes the string value home, and the data is the directory where Emacs is installed.


Finally set up the folder Confile under d:/emacs-23.3, the plugin (the default plugin in the Lisp folder) are thrown in,
Say Display-line-number.el.
Write the following code in. Emacs.

;; Show line Numbers
(load-file "~/confile/display-line-number.el")
(Require ' Display-line-number)
(Global-display-line-number-mode t)

The specific configuration file is not recorded here because it has a large connection with the plugin installation.

Record the configuration of Emacs under window

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.