开发者

Sending commands to mutliple EShells in Emacs

开发者 https://www.devze.com 2023-01-27 18:22 出处:网络
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 comm

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

精彩评论

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