Emacs - `bzr`的'start-process'不会将状态输出到缓冲区 [英] Emacs -- `start-process` for `bzr` does not output status to buffer

查看:104
本文介绍了Emacs - `bzr`的'start-process'不会将状态输出到缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在本机OSX Terminal.app中运行 bzr 时,我看到如下状态:

When running bzr in the native OSX Terminal.app, I see the status as follows:

32376kB     2kB/s / Build phase:Adding file contents 1282/3629

但是,当运行 start-process 时,我看不到没有状态输出到缓冲区。该过程正常运行,只有没有可见的输出,直到结束 - 两(2)行:

When running start-process, however, I see no status being output to the buffer. The process is functioning properly, just with no visible output until the end -- two (2) lines only:

Created new stacked branch referring to bzr://bzr.savannah.gnu.org/emacs/trunk/.

Process bzr-process finished

Emacs提供了另一个侦听功能这将通过 bzr 捕获上述状态输出,以便我可以看到进度?

Is there another listening function that Emacs offers that will capture the above-mentioned status output by bzr so that I can see the progress?

(start-process
  "bzr-process"
  "*bzr-output*"
  "/macports/bin/bzr"
  "branch"
  "--stacked"
  "bzr://bzr.savannah.gnu.org/emacs/trunk"
  "/Users/HOME/Desktop/emacs-trunk")


推荐答案

也许你可以得到bzr给你的即时状态通过以tty而不是通过管道运行进程来输出。为此,只需let-bind process-connection-type ,如下所示:

Maybe you can get bzr to give you the on-the-fly status output by running the process in a tty rather than through a pipe. For that, just let-bind process-connection-type as in:

(let ((process-connection-type t))
  (start-process ...))

但是IIRC这个值已经默认为t,所以也许这个问题在别的地方。也许bzr检查$ TERM以查看是否可以正确更新输出。所以也许你可以尝试

But IIRC this value already defaults to t, so maybe the problem is elsewhere. Maybe bzr checks the $TERM to see if it can correctly update the output. So maybe you can try

(let ((process-environment (cons "TERM=xterm" process-environment)))
  (start-process ...))

这篇关于Emacs - `bzr`的'start-process'不会将状态输出到缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆