How to execute a shell command in Emacs?
By default Emacs will execute the command synchronously; that is, it will block Emacs until the command has run its course. If you want Emacs to invoke it asynchronously, you must append an ambersand ( &) or use the asynchronous version, async-shell-command bound to M-& (note: it was introduced in Emacs 23.2.)
How to change the default error buffer in Emacs?
If you want Emacs to replace the region with the output returned from the command, you should prefix the command with the universal argument, C-u. If shell-command-default-error-buffer is set, as with the aforementioned commands, then an error buffer, and any text sent to standard error, is displayed there instead.
How does the exit code work in Emacs?
Emacs will display the exit code of the terminating command in the mode line if it is non-zero. Any output sent to standard error will be interspersed as though it came from standard out; if you want it sent to its own buffer you must set shell-command-default-error-buffer to the name of a buffer you want it sent to.
How to call a shell command in Elisp?
Call a shell command, wait for it to finish. Call a shell command, wait for it to finish, get its output. Start a program in a subprocess. Return the process object for it. NAME is name for process. It is modified if necessary to make it unique. BUFFER is the buffer (or buffer name) to associate with the process.
How to run a spec file in Ruby?
Alternatively, have a look at autotest. Running autotest in a command window will mean that the spec file will be executed whenever you save it. Also, it will be run whenever the file you are speccing is run.
Can you run a terminal emulator in Emacs?
The Emacs terminal emulator is exactly that; it emulates the VT100-style ANSI escape codes, just like xterm or rxvt. Emacs’s emulator isn’t complete or perfect, so some interactive programs won’t work properly, but most things like top and ssh will. To run the terminal emulator, type M-x term or M-x ansi-term (for full ANSI support).