Windows中Emacs中的terminal – 错误消息:“产生subprocess; 无效的论点”

我试图在Windows中启动Emacs 23.2(最新版本)的cmdterminal。

根据手册 ,我可以在Emacs中键入Mx term来进入terminal模式(为terminal启动一个新的缓冲区)。

当我这样做,我得到提示:

 Run program: path_to-emacs/bin/cmdproxy.exe 

当我键入RET ,在迷你缓冲区中出现以下错误消息:

 Spaning child process: invalid argument 

任何想法如何使其工作?

谢谢,

以下应该做的是:

  • M-:( (make-comint-in-buffer "cmd" nil "cmd" nil)

  • Mx eshell

  • Mx外壳

都有其优点和缺点。 所以选择最适合你的东西。

我尝试运行Mx compile时遇到了同样的错误。 我将以下内容添加到我的.emacs文件,并解决了问题:

 ;; Make sure that the bash executable can be found (setq explicit-shell-file-name "C:/cygwin/bin/bash.exe") (setq shell-file-name explicit-shell-file-name) (add-to-list 'exec-path "C:/cygwin/bin") 

很明显,这个解决方案只有在你安装了Cygwin的情况下才能工作,但是如果你在Windows上运行Emacs,通常至少需要Cygwin的最小安装,因为许多Emacs命令可以利用cygwin提供的命令行工具( Mx compile in我的情况)。

有同样的问题。

我跑了procmon,发现Emacs想以某种形式找到c:\bin\shsh.exesh.batsh.cmd等)。
由于我碰巧想要使用android调试shell的term模式,我创建了内容为“adb shell”的c:\bin\sh.bat ,虽然有一些奇怪的输入延迟,但它工作正常。

如果你想在Win32 Emacs的Windows上使用cmd.exe或Cygwin bash的termansi-term ,你可以看看这个项目:

fakecygpty

在Win 10上工作的非常好。

尝试使用Mx cmd-shell 。 我建议使用EmacsW32来获得最佳效果。