昨天晚上在听《内核恐慌》的时候听到,emacs 的原则是尽量在内部完成一切操作,所以今天找了一下在 Emacs 中编译 C++ 文件的方法。
第一种:M+x
然后输入 compile
指令,如下如所示

跟在 shell 中编译的指令相同 g++ filename.cpp -o filename
。如果出现错误,也有相应的提示。

第二种:作为一个操作系统,可以调用本机的 shell,以及也内带了一个 eshell。
不过这两种都不好用,本机自带的 shell 我使用的是 oh-my-zsh,所以显示出现了问题。

eshell 连自动补全都没有……
网友评论