windows 下安装emacs

本文提供了一步一步的指导,教你如何在Windows系统上安装Emacs文本编辑器,并进行基本配置以改善阅读体验。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://www.claremontmckenna.edu/math/alee/emacs/emacs.html

 

  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.

     

  2. Create an empty folder C:/emacs.

     

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

     

  4. 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 binetcinfo, etc. At this point, you have downloaded and placed the files in the right places.

     

  5. 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. It may be because you have not run emacs even once yet. When you run it once, the folder will be created.) Download init.el into that folder. Now, rename init.txt to beinit.el. (Sorry about this extra step - it is due to the local peculiarity that I don't want to explain.)

     

  6. 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.
    •  

    • 2KMEXPVistaWindows 7: add HOME as an environment variable. Follow Start > Settings > Control Panel > System. Then select Advancedfollowed 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.
  7.  

  8. Restart your machine.

     

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

     

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

     

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

     

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

     

  13. [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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值