CestDiego / nand2tetris.el

Major Mode for HDL files in nand2tetris.
42 stars 12 forks source link

Software commands #6

Closed xiongtx closed 7 years ago

xiongtx commented 7 years ago

cc @CestDiego

CestDiego commented 7 years ago

Hi thanks for your contribution is this call-process-shell-command supported by Emacs 24.5?

Could you elaborate a little bit more why we are using this instead of just shell-command?

xiongtx commented 7 years ago

Yes, call-process-shell-command has been available since before Emacs 24.5.

If you try calling shell-command, you'll notice that Emacs freezes until you C-g because you're bringing that process into the foreground. call-process-shell-command can return immediately.

The documentation of shell-command also says:

In Elisp, you will often be better served by calling call-process or start-process directly, since it offers more control and does not impose the use of a shell (with its need to quote arguments).

call-process-shell-command is just a convenient wrapper around call-process for shell commands.