help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Building a database interface in Emacs


From: Lennart Borgman
Subject: Re: Building a database interface in Emacs
Date: Wed, 20 Dec 2006 18:46:43 +0100
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

Mathias Dahl wrote:
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?

Perhaps these helps?

  (info "(elisp) Filter Functions")
  (info "(elisp) Accepting Output")
  (info "(elisp) Sentinels")




reply via email to

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