我使用以下命令启动emacsclient:
emacsclient -a "" -c这将打开一个连接到emacs守护进程的帧,并启动该守护进程(如果尚未启动)。太好了,这个很好用。
然而,我喜欢最大化地打开我的emacs框架。对于emacs,我会使用-mm。然而,这并不适用于emacsclient。我该怎么做呢?
(看起来我可以像这样添加一个外壳文件:emacsclient -a "myshell.sh" -c,其中外壳文件是:emacs -mm,但我还没能做到这一点--服务器不能继续工作。)
发布于 2012-09-19 13:17:05
您可以将以下行添加到.emacs,这样Emacs就可以在窗口最大化的情况下启动。详情请参见http://www.gnu.org/software/emacs/manual/html_node/elisp/Size-Parameters.html#Size-Parameters。
(add-to-list 'default-frame-alist '(fullscreen . maximized))Emacs客户端接受-F选项,您可以在其中指定帧参数,因此上面的示例如下:
emacsclient -c -a "" -F "((fullscreen . maximized))"发布于 2012-10-19 16:06:28
假设您想要运行emacsclient fullscreen,这是我的情况。
man emacsclient显示emacsclient具有-F选项:
-F, --frame-parameters=ALIST
set the parameters of a newly-created frame.在Emacs手册,这是一个info文件,(emacs) emacsclient Options部分有更多的信息。对于这个问题,(elisp) Size Parameters特别提到了fullscreen参数。要运行emacsclient fullscreen,您需要提供一个列表,其中一个元素是(fullscreen . fullboth):
emacsclient -c -F "((fullscreen . fullboth))"发布于 2011-12-03 19:21:08
emacsclient提供了用于执行任意Emacs Lisp代码的--eval (缩写为-e)命令行选项,因此您可以访问文件并从命令行调用suspend-frame,如下所示:
emacsclient -a "" -c --eval "(progn (find-file \"/tmp/my-file\") (suspend-frame))"您可以将其放入脚本中,例如:
#!/bin/bash
emacsclient -a "" -c --eval "(progn (find-file \"$1\") (suspend-frame))"https://stackoverflow.com/questions/8363808
复制相似问题