我正在尝试使用 shell 命令来简化在 emacs 中添加目录等命令。我在让它工作时遇到问题。
我输入 M-!
然后我的迷你缓冲区说 Shell command:
但我的命令都没有被接受。例如,输入 pwd
或 ls
我收到类似 pwd is not recognized as an internal or external command, operable program, or batch file.
的消息.有什么建议?
我使用了这个引用,但它似乎对我的情况没有帮助:
http://www.nongnu.org/emacsdoc-fr/manuel/shell.html
额外信息
我正在使用 Windows 7 操作系统。如果这很重要,我还安装了 cygwin64。 emacs 只是连接到外部 shell ,还是 shell 内置于 emacs 中?如果 shell 是外部的,我可以连接到 cygwin64(虽然它可能不值得麻烦)。
关于如何正确配置它的任何建议?我找到了以下资源,但我不确定这是否是正确的方向:http://www.emacswiki.org/emacs/EmacsApp
最佳答案
听起来您需要确保变量 exec-path
包括这些命令( ls
等)所在的目录。
该错误消息似乎不是 Emacs 错误消息(来自 Emacs Lisp 或 C 源代码),而是来自尝试执行您的命令的 shell。
关于shell - Emacs:如何在 emacs 中使用 shell 命令提示符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21198124/