emacs设置了单例模式后无法设定文件关联解决办法

emacs设置单例模式的本质就是使用下列参数启动:
C:\emacs-24.5\bin\emacsclientw.exe --no-wait --alternate-editor="C:\emacs-24.5\bin\runemacs.exe" "%1"

如果是设置个快捷方式图标什么的还好,可以直接加参数,但是我在windows下经常喜欢双击文件打开,而双击打开实际上就是调用文件的默认打开方式,而在设置默认打开方式的时候只能选择应用程序名而不能加参数。有如下解决方案

打开regedit,修改
HKEY_CLASSES_ROOT\Applications\emacsclientw.exe\shell\open\command
的值为:
C:\emacs-24.5\bin\emacsclientw.exe --no-wait --alternate-editor="C:\emacs-24.5\bin\runemacs.exe" "%1"

修改后对于一个文件,可右键属性-打开方式,选择GNU EmacsClient即可设置默认用emacs单例方式打开这种类型的文件。

posted @ 2017-05-31 19:10  叫我家宝  阅读(249)  评论(0编辑  收藏  举报