I wish to start up a number of processes when I startup emacs,such as a webserver in one eshell, and an instance of weblogic 开发者_StackOverflow社区in another shell, but whenever I try to send a command to an eshell then Emacs just hangs. I have tried using the "interactive" command as well, but Emacs still hangs.
(require 'cl)
(defun eshell-run (programs)
(loop for p in programs for i from 1 do
(with-current-buffer (eshell i)
(insert p)
(eshell-send-input))))
(eshell-run '("program1" "program2"))
Edit:
If you add the above lines to your init file, the programs listed in the last line will be executed automatically when you start Emacs.
精彩评论