Window上的Emacs Deamon模式设置

Window下的Emacs Deamon模式设置
Emacs在window下其实是没有daemon模式的。不过可以通过下面的配置达到几乎和daemon一样的效果。

一、在Emacs中启动server
(server-start)

在.emacs文件中添加上面的代码。

二、在注册表中添加右键菜单
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\Open With Emacs\command]
@="C:\\emacs\\bin\\emacsclientw.exe -n -a \"C:\\emacs\\bin\\runemacs.exe\" \"%1\""

粘贴上面的代码到记事本,保存为“menu.reg”文件,双击运行。

配置完毕。这样,在第一次启动Emacs的时候将会加载所有配置。后面使用右键“Open With Emacs” 来打开文件将非常快。(注意:不要多次启动Emacs,以免提示什么server重复打开的异常把你吓坏