【发布时间】:2015-02-27 21:10:41
【问题描述】:
我一直在使用 mac-emacs,并且我有 M-x install-package-d 咖啡模式。我决定尝试coffee-compile-file 命令,但是当我运行它时,它失败了,抱怨它找不到coffee 命令。
所以,我在 ZSH 和 Bash 上打开了终端。 coffee 和 node 在两者上都运行良好。所以,拆分我的 emacs 屏幕,plink out M-x term,让 bash 加载,然后输入 coffee:
bash-3.2$ coffee
bash: coffee: command not found
奇怪。我对 node 和 npm 进行了同样的尝试。
bash-3.2$ node
bash: node: command not found
bash-3.2$ npm
bash: npm: command not found
我的问题是,为什么这种情况只发生在M-x term,我该如何解决。
【问题讨论】:
-
大概你在 shell 初始化期间设置了路径和东西,而
M-x term没有发生这种情况。你在哪里设置的? -
@Etan Reisner 我检查了
.zshrc和.bashrc,但没有提到node或coffee,只有rhino和clojure。 -
也许你正在使用不同的 shell 解释器。当你运行
M-x term时,Emacs 会要求你选择解释器。检查您是否在 Emacs 外部的控制台中使用相同的。为此,只需在终端上输入ps。 -
which coffee输出什么(coffee工作的地方)?$PATH在 emacs shell 中是否不同? -
@Akira 这确实是 bash,但有趣的是,
/bin/bash而不仅仅是bash。我在其中运行了bash,但仍然找不到coffee。