简体   繁体   中英

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 . I saw a couple posts explaining how to load a file at startup, but I believe the ansi-term buffer is a bit different.

I'd rather modify my .emacs than create an alias for emacs.

(add-hook 'emacs-startup-hook
  (lambda ()
    (kill-buffer "*scratch*")
    (ansi-term "/bin/bash")
  ))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM