如果我在系统上运行emacs作为守护进程,我可以使用emacsclient轻松连接到它.我知道.但是,我想知道的是,如果守护程序已在运行,有没有办法告诉emacs(而不是emacsclient)表现得像emacsclient?
例如
# emacs daemon is not running
emacs # should start a new frame
# ...
# emacs daemon IS running
emacs # should actually behave like emacsclient, i.e. connect to my daemon
Run Code Online (Sandbox Code Playgroud)
我能为init.el做些什么来复制这种行为吗?
Luk*_*vin 10
我不这么认为,但是你可以通过使用emacsclient
空字符串作为--alternate-editor
选项来实现类似的效果吗?来自http://www.gnu.org/s/libtool/manual/emacs/emacsclient-Options.html#emacsclient-Options:
-a command
--alternate-editor=command
...作为特殊例外,如果command是空字符串,则emacsclient以守护进程模式启动Emacs,然后再次尝试连接.