emacs配置笔记(windows10)
1.安装
1、 emacs官网获取安装程序:
http://www.gnu.org/software/emacs/
2.、GNU Emacs for Windows can be downloaded from a nearby GNU mirror; or the main GNU FTP server.
Unzip the zip file preserving the directory structure, and run
bin\runemacs.exe. Alternatively, create a desktop shortcut to
bin\runemacs.exe, and start Emacs by double-clicking on that
shortcut's icon
3、配置文件路径配置
官方说明:
On Windows, the .emacs file may be called _emacs for backward compatibility with DOS and FAT filesystems where filenames could not start with a dot. Some users prefer to continue using such a name, because Explorer cannot create a file with a name starting with a dot, even though the filesystem and most other programs can handle it. In Emacs 22 and later, the init file may also be called.emacs.d/init.el. Many of the other files that are created by lisp packages are now stored in the.emacs.ddirectory too, so this keeps all your Emacs related files in one place.
All the files mentioned above should go in your HOME directory. The HOME directory is determined by following the steps below:
If the environment variableHOME is set, use the directory it indicates.
If the registry entry HKCU\SOFTWARE\GNU\Emacs\HOME is set, use the directory it indicates.
If the registry entry HKLM\SOFTWARE\GNU\Emacs\HOME is set, use the directory it indicates. Not recommended, as it results in users sharing the same HOME directory.
If C:\.emacs exists, then use C:/. This is for backward compatibility, as previous versions defaulted to C:/if HOME was not set.
Use the user's AppData directory, usually a directory called Application Data under the user's profile directory, the location of which varies according to Windows version and whether the computer is part of a domain.
参考:https://blog.csdn.net/lihenair/article/details/19050479
方法一:原文:https://blog.csdn.net/zhuxiaoyang2000/article/details/8819601
默认情况下,Windows系统中Emacs的配置文件.emacs在C:\Users\
方法二:
打开注册表,找到HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs(如果没有则手动添加项), 在此项下添加字符串值,名称为HOME,值为D:\Emacs23.2。这样做的目的是让D:\Emacs23.2成为Emacs的home路径(传说中 的home path,以后你将会经常看到“home目录”、“home directory”等等)。
4、创建配置文件.emacs.d目录和.emacs文件(.emacs文件的优先级更高)
相信.emacs.d目录和.emacs文件是困扰大家很久的问题了,其实有个简单的办法
可以解决此问题。启动emacs(注:win7系统需要右键“以管理员身份运行”),用鼠标点击Options菜单,随便点击一两个选项,比如点击一下Active
Region Highlighting,然后点击Save
Options。先不要担心你会破坏了什么东西,这样做的目的是让emacs自动创建.emacs.d目录以及.emacs文件!观察你的Emacs窗口
最后一行,是否显示“Wrote D:/Emacs23.2/.emacs”?如果是的话就对了,当你选择Save
Options的时候,Emacs会在home路径下产生.emacs文件,并把配置信息写进这个文件。D:\Emacs23.2\目录下将会产生这两个文件。