开发者

Sending commands to mutliple EShells in Emacs

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜