Emacs — `start-process` for `bzr` does not output status to buffer

雨燕双飞 提交于 2019-12-11 09:06:36

问题


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

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

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")

回答1:


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 ...))

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 ...))


来源:https://stackoverflow.com/questions/23373429/emacs-start-process-for-bzr-does-not-output-status-to-buffer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!