[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building a database interface in Emacs

From: Mathias Dahl
Subject: Re: Building a database interface in Emacs
Date: Wed, 20 Dec 2006 17:49:14 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (windows-nt)

Mathias Dahl <address@hidden> 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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]