Run the command when starting Emacs (emacs.el)

How to execute a command or plugin when starting Emacs?

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

thanks

+4
source share
2 answers

The syntax for calling a function is:

(shell-toggle switch-cd)

You can put this in your .emac so that it runs at startup. Here, I assume that you downloaded shell-toggle.el from your download path in .emacs before.

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

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

If you want the shell to open at startup, you just need to add

 (shell) 

at the end of your .emacs . This should open a new shell buffer that fills the entire window (unless you have another command requesting half the window elsewhere in .emacs).

+3
source

Source: https://habr.com/ru/post/1339686/


All Articles