我正在尝试使用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完成设置?
我尝试在缓冲区的buffer-process上接受-process-output作为参数发送给上面的函数,但它只是挂起了。
感谢您提供的任何帮助:)
托马斯
发布于 2012-08-20 14:05:17
在戴夫·洛夫撰写的python.el中,使用了以下内容:
(while (progn
(accept-process-output proc 5)
(null python-preoutput-result)))发布于 2012-08-06 19:26:28
在python-mode.el中,对正在运行的进程的检查是这样完成的
(or (get-buffer-process (py-buffer-name-prepare pyshellname))
(get-buffer-process
(py-shell nil dedicated pyshellname
switch sepchar py-buffer-name t)))))也就是说,如果Python shell不存在,它的start将返回process-symbol。
https://stackoverflow.com/questions/11824976
复制相似问题