run sm from emacs