gpt4 book ai didi

emacs - 等待 comint 模式缓冲区

转载 作者:行者123 更新时间:2023-12-02 02:13:11 25 4
gpt4 key购买 nike

我正在尝试使用 comint erlang-shell 打开一个后台缓冲区,一旦启动,就在 emacs 中运行一个函数调用(使用 distel 将其二进制文件发送到 erlang 节点)。

即:

...
(let ((args (append (list "-sname" node-name "-pa") path)))
(get-buffer-create buffer-name)
(apply #'make-comint-in-buffer node-name buffer-name "erl" nil args)
(erl-check-backend (make-node-name node-name))
...

问题是当我调用 distel 时,节点还没有启动(epmd 没有注册名称)所以它失败了。我猜这是因为劣质进程还没有机会运行。有没有办法等到 comint-buffer 完成设置?

我尝试在作为参数发送到上述函数的缓冲区的缓冲区进程上接受进程输出,但它只是挂起。

感谢任何帮助:)

托马斯

最佳答案

在 Dave Love 编写的 python.el 中使用了以下内容:

(while (progn
(accept-process-output proc 5)
(null python-preoutput-result)))

关于emacs - 等待 comint 模式缓冲区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11824976/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com