I'd like to occasionally use
hg split and
hg commit --interactive from Emacs, but those commands bring up a GUI. At the moment I either use a separate terminal or ansi-term for those, but would like to do it in more organic way.
Probably the minimal ideal interface would be a function like this:
(defun run-terminal-app cmd args &optional callback)
I have rough ideas how to implement this, e.g.:
- put a command with args into a temporary shell file
- launch (ansi-term temp-shell-file some-special-buffer-name)
- add a term-exec-hook to wait for exit in a some-special-bufer-name, then running a callback, killing a buffer, and removing a hook
But maybe I am just missing something and this is already implemented in some package, or even out of the box?