简体   繁体   中英

Execute a command at Emacs startup (emacs.el)

How to execute a command or a plugin at Emacs startup ?

I want to execute shell-toggle-cd (from http://user.it.uu.se/~mic/shell-toggle.el ) at startup.

Thanks

The syntax for calling the function is

(shell-toggle-cd)

You can put that in your .emacs so that it is executed at startup. Here I assume that you have loaded the shell-toggle.el from your load path in .emacs before that.

You can load the package by saving shell-toggle.el somewhere and adding this to your .emacs:

(add-to-list 'load-path "/path/to/somewhere")
(require 'shell-toggle)

if you just want a shell to open at startup, you just have to add

(shell)

at the end of your .emacs . This should open a new shell buffer filling up the whole window (unless you have some other command asking to get half of the window somewhere else in the .emacs).

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