我想emacsclient
从命令行连接到给定的 Emacs 服务器。阅读使用 Emacs 作为服务器的手册,我想我可以这样做:
emacs --eval '(server-start)' --eval "(set-variable 'server-name \"foo\")" --no-splash fileA &
然后:
emacsclient -s "foo" -n fileB
但这会产生错误:
emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
emacsclient: error accessing socket "foo"
但是,我可以这样做:
emacsclient -e '(prin1 server-name)'
这使
"foo"