原文出自克莱蒙特麦肯纳学院Arthur H. Lee的一篇关于Emacs在windows环境下安装的介绍!


Arthur H. Lee


W. M. Keck Associate Professor of Computer Science

Dept of Mathematics and Computer Science

Claremont McKenna College

850 Columbia Avenue

Claremont, CA 91711


Adams Hall 216, 909-607-0410, alee at cmc dot edu


Installing Emacs on Windows 95/98/2K/NT/ME/XP/Vista/Windows 7

## Emacs 安装: Windows 95/98/2K/NT/ME/XP/Vista/Windows 7 (第一版)

日期:2012-07-03


Many people have successfully installed emacs on Windows 95, 98, 2K, NT, ME, XP, Vista, and Windows 7 using the instructions below.

## 使用下面的说明许多人已经成功的在Windows 95,98,NT,2K,ME,XP,Vista, Windows 7下安装了Emacs (the instructions below. 下面的说明).


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 try to 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.

## 声明(Disclaimer, 免责声明):  这个页面正在维护主要是针对我的学生。如果你不是学我课程的一名学生使用下面的提示将给你带来风险。

## 在何种形式下是不存在保证的!这里不能保证这些操作指南是最新的,但我会为我的学生在一个持续的基础上尽量更新他们。


Emacs version 24.1: This was the latest version available at the time of this writing (July 3, 2012).

## Emacs 版本 24.1: 这是在写作本文时可用的最新版本(2012-07-03)。


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.!.

## 请按照以下的步骤在你的Windows机器上安装Emacs.这里没有创意空间;你必须完全按照提示去做 - 每一个字!


1、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().

## 挑选你想要安装Emacs的驱动器和文件夹。 我将假设它是"c:\emacs", 但你也可以选择一个不同的.如果你选择一个不同的驱动器或者文件夹,

## 因此你需要调整下面的说明。


2、Create an empty folder C:\emacs .

建立一个空的文件夹"c:\emacs"


3、Go here and download the following (or the latest version if you find a newer one) at the bottom of that page into the folder that you created above:

emacs-24.1-bin-i386.zip 30-Jul-2009 01:10 46M  

At this point, you should have one file named emacs-24.1-bin-i386.zip of about 46 megabytes in the C:\emacs folder. Check to be sure.

## here http://ftp.gnu.org/gnu/windows/emacs/

## 跳转到如上所示的地址,在下载页面的底部下载下面的文件(或如果你找到最新的版本)打之前创建的文件夹中。

## emacs-24.1-bin-i386.zip 30-Jul-2009 01:10 46M  

## 到这里, 在"c:\emacs"目录下你已经有一个文件名为emacs-24.1-bin-i386.zip的文件,文件大约46M,确保它是存在的。


4、Click on that file using Windows Explorer to extract(extract) files from that archived(存档) file.

Your extracted files should go into C:\emacs folder. Once extraction(extraction) is done, you will see a folder named emacs-24.1 under C:\emacs . Under emacs-24.1 ,

you will see other folders including bin , etc , info , etc. At this point, you have downloaded and placed(放置) the files in the right places.

## 点击那个文件使用Windows资源管理器从存档文件中提取文件。

## 你已经提取文件到“c:\emacs” 文件夹。 一旦提取完成,你将看到一个文件名称为emacs-24.1的目录在"c:\emacs", 在“emacs-24.1”,目录下,

## 你将看到其他的文件夹包括bin,info,etc。到这里,你已经下载并放置文件到正确的位置。


5、Depending(根据) on the operating system that you use, choose one of the following paths:

95 or 98 : edit your autoexec.bat file and add this line:

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 in Notepad.


2K , ME , XP , Vista : 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\ .


Windows 7 : add HOME as an environment variable. Follow Start > Control Panel > System and Security > System > Advanced system settings .

Then select Advanced followed by Environment Variables .

Then, add HOME as a user variable with its value C:\emacs\ . (Note that this may be somewhat[有些] site dependent[依赖的].)

## 根据你使用的操作系统,选择一下的路径之一:

## 95 或 98: 编辑你的autoexec.bat文件并且加入这行:

## set HOME=C:\emacs\

## 你可能会发现在你的c:盘驱动器下找到autoexec.bat的文件,通过记事本编辑它,你不能通过点击编辑它。

## 启动Notepad, 在Notepad(记事本)中通过文件菜单打开它。

## 2k, Me, Xp, Vista: 将HOME加入环境变量。如下:开始菜单 > 设置 > 控制面板 > 系统 。环境变量在高级选项卡的下面。

## 然后,添加用户变量HOME, 值为"c:\emacs\".

## Windows 7: 添加HOME到环境变量. 开始菜单 > 控制面板 > 系统和安全 > 系统 > 高级系统设置.

## 环境变量在高级选项卡下面。

## 然后,添加一个用户变量HOME, 值设置为"c:\emacs\". (提示这可能有些站点依赖)


6、Restart your machine.

## 重启你的机器


7、Let's run emacs now. 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-24.1\bin folder using Windows Explorer. There you will find a file named runemacs.exe .

Create a shortcut(捷径), then you will see a file named runemacs.exe - Shortcut . Before you take it to the desktop or to the dock,

you might want to change the default 'Start in' folder. Change it to whatever you like through the Properties menu of the shortcut file.


In my case, I changed it from C:\emacs\emacs-24.1\bin to C:\alee , which is my home folder.

Your emacs will use that folder as the base folder when it looks for a file to edit.

Now, you are ready to take it to the desktop or the dock so that you can use it to run Emacs from there.

Now, you should be in business - run it! If it doesn't work, you've made a mistake in one of the steps above.

Double and triple(三倍) check.

## 现在让我们来运行Emacs. 到这里,你刚刚已经安装了Emacs, 你可能想要创建一个桌面的图标。

## 使用Windows资源管理器进入到"C:\emacs\emacs-24.1\bin"目录下, 这时你将找到一个名为runemacs.exe的文件。

## 建立快捷方式,这时候你可以看到一个已经被命名runemacs.exe的快捷方式。然后你能带他到桌面或者dock,

## 你可能想更改默认的起始目录。更改为任何你喜欢通过属性菜单中的快捷文件。

## 在我的方案中,我更改它从"C:\emacs\emacs-24.1\bin"到"C:\alee",这就是我的家目录。

## 当查找文件或者编辑文件的时候你的Emacs将使用这个文件夹做为基础。

## 现在,你已经带他到桌面或者dock, 所以你能在这里运行Emacs。

## 现在,你可以在业务中运行它!如果它没有工作,你可能在以上的步骤中犯了一个错误!

## 双倍和三倍检查

## 注:快捷方式的属性设置中可以设置起始位置


8、Now you are ready to customize your emacs a little so that it will recognize the syntax of the source file that you will edit, eg,

Java files with the .java extension. Download init.txt to C:\emacs\.emacs.d\init.txt by right-clicking on the link.

Yes, there should be a folder named .emacs.d by now since you have run emacs at least(至少) once by now(现在).

Download init.txt 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[说明].)

## 现在你已经做了一点Emacs的自定义,它将识别语法的原文件爱你,你将编辑它。例如:Java 文件.java. 通过右键点击下载init.txt文件到"C:\emacs\.emacs.d\init.txt"。

## http://www.claremontmckenna.edu/pages/faculty/alee/emacs/init.txt

## 是的,现在你至少已经运行过一次emacs, 家目录应该有一个文件夹名为".emacs.d",

## 下载init.txt到这个文件夹。Now, 从命名init.txt到init.el.

## (很抱歉关于这个额外的步骤 - 这是一个本地应该有的特性文件,我不想过多说明。)

## 注:“.emacs.d”通常在家目录中,如何找寻家目录"ctrl-x ctrl-d" 输入~/将显示家目录的位置


9、If you want to clean up a little, you may delete emacs-24.1-bin-i386.zip at this point.

You still need .emacs.d and emacs-24.1 in the C:\emacs folder though.

## 如果你想清理一下,你可以在这里删除emacs-24.1-bin-i386.zip文件

## 你仍旧需要.emacs.d 和emacs-24.1 在"c:\emacs"目录下。


10、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.

## 学习如何使用Emacs, 在Emacs Window你能找到帮助菜单的Emacs 教程。

## 或者,如果你想要一个简单的版本,尝试我写的这个教程。

## http://www.claremontmckenna.edu/pages/faculty/alee/emacs/emacs_lab.html


11、[ 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, eg,

GNU Emacs FAQ For MS Windows ,

but Paul Fiorillo found this site.

## 【仅有可选因为我想这个页面仅够开始】

## 要学习如何自定义Emacs或者简单的查看更多的帮助,尝试Hemant Kumar的"Emacs Help Guide"

## http://www.linuxhelp.net/guides/emacs/

## (这个站点将讨论关于.emacs文件,这是在unix/linux 版本的init.el)

## 我相信还有很多其他的Emacs资源信息在那里,例如:针对windows的Gnu Emacs常见问题

## 但Paul Fiorillo发现了这个站。

## http://www.gnu.org/software/emacs/windows/index.html


原文地址:http://www.claremontmckenna.edu/pages/faculty/alee/emacs/emacs.html