I've been using vi quite a while, and with a Mac, I sometimes use TextMate, and finally, I found the greatness of emacs. And, it's very likely that I settle in emacs.
The problem is, I sometimes need the other (vi/TextMate) editor for doing something. It's not that emacs doesn't have the feature, it's just that I need the feature right now, and I know how to do that with the 'other' editor. And the same is true with the other editor.
My question is how can I launch the one editor from the other. It's not just launching an app, but launching an app with the file that I'm editing.
- How can I launch vi or TextMate(mate) from emacs?
- How can I launch emacs or mate from vi?
- How can I launch vi or emacs from TextMate?
ADDED
After Jérôme Radix's answer, I came up with the following command.
(defun runmate () (interactive) (runeditor "/Users/smcho/bin/mate")) (defun runeditor (editor) (let (filename (file-truename buffer-file-name)) (setq cmd (format "%s %s" editor (file-truename buffer-file-name))) (save-window-excursion (async-shell-command cmd))))