Mathias Dahl <brakjoller@gmail.com> writes:
I can attach a process filter function to the process but I don't
understand how to "pause" my main code until my filter function has
been called. Well, I came up with a hack, that seems really ugly:
(defvar foo-output nil)
(defun foo ()
(process-send-string process "blabla")
(setq foo-output nil)
(while (not foo-output)
(sleep-for 0 10))
(use-result))
(defun foo-filter (proc string)
(setq foo-output string))
And I just discovered that even the above won't work because I receive
data in chunks. I guess the question I am asking is: how to I know
when there is no more output? Maybe I need to look for signs in the
output itself?