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

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

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

打开regedit,修改
HKEY_CLASSES_ROOTApplicationsemacsclientw.exeshellopencommand
的值为:
C:emacs-24.5inemacsclientw.exe --no-wait --alternate-editor="C:emacs-24.5in unemacs.exe" "%1"

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

原文地址:https://www.cnblogs.com/sheeva/p/6925576.html