Emacs and Long Shell Commands Emacs and Long Shell Commands shell shell

Emacs and Long Shell Commands


As doublep mentioned, there is M-x compile, and there's also just the simple M-x shell and in that shell you run whatever you want.


You can also use comint-run to execute a command without needing to start a sub-shell first. I believe M-x shell uses comint mode with some modifications, so this won't be a whole lot different from that. But if you want to call a program directly and have its input and output be tied to a buffer, comint-run is the function to call. It is a little tricky to use, so read the documentation: C-h f comint-run.