1

如何让 WSL 在 Windows GUI Emacs 的窗口中运行?

到目前为止,我能做到的唯一方法是通过输入命令在 emacs shell 或 term cmd 中输入一个子 shell wsl,即使这样,也没有背景 ANSI 着色,尽管前景色似乎正在工作。

以下是直接生成wsl.exe子进程的尝试。

(if (eq system-type 'windows-nt)

    (setq explicit-shell-file-name "C:\\Windows\\System32\\wsl.exe")

    (defun run-wsl ()
        (interactive)
        (let ((shell-file-name "C:\\Windows\\System32\\wsl.exe"))
        (ansi-term "*wsl.exe*"))))

模式栏下的错误信息:Spawning child process: Invalid argument


笔记:

我在问如何在 Emacs 中获取 WSL,而不是在 WSL 中获取 Emacs。

4

0 回答 0