Use bash scripts to control Emacs