In Emacs, I don't like shell-mode
/eshell-mode
since they cannot take full use of zsh
and they suck much.
So I hope to use xterm
as the external subprocess.
(global-set-key (kbd "M-<f2>")
(lambda () (interactive)
(start-process "XTerm" nil "xterm")))
And now the PWD of xterm is synced with Emacs default-directory
and the term is now a full-feathered one. But there is ONE problem: I the startup time of the sub-rountine is always disappointing.
So I hope starting xterm only once and when in Emacs, if it finds there is a subprocess called XTerm
running, 1) switch to it 2)set the PWD of shell running in xterm to default-directory
of Emacs.
Is it possible to do so?
If neither is possible, then with tmux
, can we achieve this goal?