1
我想编写一个C程序,它接收Emacs缓冲区的一个区域并用它的输出替换该区域。将Emacs缓冲区传递给C
这里是我的C程序:
#include <stdio.h>
int main(int argc, char *argv[]) {
printf("The argument given was: %s\n",argv[1]);
}
我
g++ -Wall -o c_example c_example.c
编译这一点,并把二进制在我的道路。当我在终端做
c_example Hello
,我得到
The argument given was: Hello
,但如果我在Emacs的缓冲区选择“你好”和使用shell命令,对区域与“铜M- | c_example “将其替换为
The argument given was: (null)
改为。为什么是这样?
不是一个Emacs用户,但我想这竖线表示您管道缓冲作为标准输入。 – a3f