【问题标题】:Emacs: How to use shell command prompt with emacs?Emacs:如何在 emacs 中使用 shell 命令提示符?
【发布时间】:2014-02-07 12:07:20
【问题描述】:

我正在尝试在 emacs 中使用 shell 命令来简化添加目录等命令。我无法让它工作。

我输入M-!,然后我的迷你缓冲区显示Shell command:,但我的命令都没有被接受。例如,输入pwdls 我会收到类似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 只是连接到外部外壳,还是外壳内置在 emacs 中?如果外壳是外部的,我可以连接到 cygwin64(虽然它可能不值得麻烦)。

关于如何正确配置的任何建议?我找到了以下资源,但我不确定这是否是正确的方向:http://www.emacswiki.org/emacs/EmacsApp

【问题讨论】:

  • 你使用什么样的操作系统?
  • 我使用的是 Windows 7。
  • 你可以考虑使用 Emacs 内置的目录编辑模式(dired);您可以访问一个目录文件(C-x C-f,输入目录名称,RET)并在那里对其进行操作;例如+ 添加目录。

标签: shell emacs


【解决方案1】:

听起来您需要确保变量 exec-path 包含这些命令(ls 等)所在的目录。

该错误消息似乎不是 Emacs 错误消息(来自 Emacs Lisp 或 C 源代码),而是来自试图执行您的命令的 shell。

【讨论】:

    猜你喜欢
    • 2014-02-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-07
    • 2011-12-05
    • 1970-01-01
    • 2011-05-22
    • 1970-01-01
    相关资源
    最近更新 更多