emacs中Rust CLI程序的运行调试

程序是Rust写的,GitHub - tt-abdulhaq/task-tracker 运行后,有跳出的窗口 但问题是这里输入不了东西,按1,界面没反应,是怎么回事?有懂的老哥吗?

要交互输入的话我一般就 M-x eshell 在 eshell 中执行 cargo run

您也没说是怎么运行的啊.

我是配的rustic 然后就是C-c C-c C-r (rustic-cargo-run)

  • rustic-cargo-run

This is meant for non interactive programs. It’s creates a new mode which is built on top of rustic-compilation-mode. You can press gin this mode’s buffer to make it re-run.

  • rustic-cargo-comint-run

This is meant for both interactive and non interactive programs. For non interactive programs, you would need to pass data to it via stdin. It’s creates a new mode which is built on top of comint-mode. You can press C-c C-g in this mode’s buffer to make it re-run. You can pass input to the program directly in it’s output buffer and press RET.

3 个赞

哥,你是我的神!

emacs 里面能输入的(准确来说是交互)就是 comint