[英]Emacs: how to load an ansi-term buffer at startup?
I have figured how to close the scratch buffer and the GNU Emacs buffer, and I would now like to have a terminal started automatically within emacs, instead of having to type manually Mx ansi-term
. 我已经找到了如何关闭暂存缓冲区和GNU Emacs缓冲区的方法,现在我想让一个终端在emacs中自动启动,而不必手动键入
Mx ansi-term
。 I saw a couple posts explaining how to load a file at startup, but I believe the ansi-term buffer is a bit different. 我看到几个帖子解释了如何在启动时加载文件,但我相信ansi-term缓冲区有些不同。
I'd rather modify my .emacs than create an alias for emacs. 我宁愿修改.emacs也不愿为emacs创建别名。
(add-hook 'emacs-startup-hook
(lambda ()
(kill-buffer "*scratch*")
(ansi-term "/bin/bash")
))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.