I know about shell-command-on-region
.
Is there any way to pipe a region through a non-shell command? The start-process
and call-process
functions invoke executables directly, without using the shell. I'd like to avoid shell overhead when piping the contents of a region into an external command, as well.
Can this be done in emacs?
Thanks in advance.
shell-command-on-region
ends up callingcall-process-region
with the variableshell-file-name
as the command.make-pipe-process
. I think i can use it to create a process for running an executable without using any shell, which can then accept input viasend-process
. That input could be the contents of a buffer. I will code up a proof-of-concept, and if it works, I'll post it here as an answer. Excelsior!