如果我可以运行Emacs文本的选定区域作为c或c ++程序的输入,那将是很好的。然后程序的输出可以覆盖所选文本。有这样的功能吗?
答案 0 :(得分:2)
shell-command-on-region is an interactive compiled Lisp function in
`simple.el'.
It is bound to <s-kp-bar>, s-|, M-|, <menu-bar> <tools>
<shell-on-region>.
(shell-command-on-region START END COMMAND &optional OUTPUT-BUFFER
REPLACE ERROR-BUFFER DISPLAY-ERROR-BUFFER)
Execute string COMMAND in inferior shell with region as input.
Normally display output (if any) in temp buffer `*Shell Command Output*';
Prefix arg means replace the region with it. Return the exit code of
COMMAND.