“emacsclientw -c ”作为 Outlook 宏运行非常慢,但如果在 Window Powershell 中运行则超级快

Per*_*ner 5 emacs outlook vba emacsclient

以下是在 Windows 10 中启动 emacsclient 框架的简单命令,我已将其作为分配给新按钮的宏添加到 Outlook 中。

Shell ("c:/Users/user_name/emacs-25.3-x86_64/bin/emacsclientw.exe -c ")
Run Code Online (Sandbox Code Playgroud)

但每次通过该按钮启动时,Outlook 消息窗口都会在 15 秒以上的时间内无响应。

如果我将该宏更改为:

Shell ("c:/Users/user_name/emacs-25.3-x86_64/bin/runemacs.exe")
Run Code Online (Sandbox Code Playgroud)

即,要启动 emacs 而不是 emacsclient,它可以立即完成,而不会对 Outlook 窗口产生任何影响。

如果我使用以下命令直接在 Windows Powershell 中启动 emacsclient:

c:/Users/user_name/emacs-25.3-x86_64/bin/emacsclientw.exe -c 
Run Code Online (Sandbox Code Playgroud)

一个新的框架也可以立即弹出,而不会对任何东西造成任何明显的影响。

因此直接启动“emacsclientw -c”很快,通过 Outlook 宏启动 emacs 也很快。但是通过 Outlook 宏启动“emacsclientw -c”非常慢。

谁能解释一下为什么会出现这种情况?

(顺便说一句,“runemacs.exe --daemon”是我的 Windows 启动脚本的一部分。)