Windows中Emacs中的终端 - 错误消息:"生成子进程;无效参数"

Ame*_*ina 35 windows emacs term

我正在尝试在Windows中的Emacs 23.2(最新版本)中启动cmd终端.

根据手册,我可以通过输入在Emacs中进入终端模式(为终端启动新的缓冲区)M-x term.

当我这样做时,我会收到提示:

Run program: path_to-emacs/bin/cmdproxy.exe
Run Code Online (Sandbox Code Playgroud)

当我输入时RET,我在迷你缓冲区中收到以下错误消息:

Spaning child process: invalid argument
Run Code Online (Sandbox Code Playgroud)

任何想法如何使其工作?

谢谢,

Ble*_*ers 8

以下应该做:

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

  • M-xESHELL

  • M-x贝壳

所有这些都有其优点和缺点.所以选择最适合你的.


nis*_*pio 6

我在尝试运行时遇到了同样的错误M-x 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")
Run Code Online (Sandbox Code Playgroud)

显然,只有安装了Cygwin才能使用此解决方案,但如果您在Windows上运行Emacs,通常至少需要安装Cygwin,因为许多Emacs命令可以利用cygwin提供的命令行工具(M-x compile在我的例子中) ).