unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Mathias Dahl <brakjoller@gmail.com>
Subject: Re: Building a database interface in Emacs
Date: Wed, 20 Dec 2006 17:49:14 +0100	[thread overview]
Message-ID: <umz5izf5h.fsf@gmail.com> (raw)
In-Reply-To: ur6uuzhc2.fsf@gmail.com

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?

  reply	other threads:[~2006-12-20 16:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-20 12:28 Building a database interface in Emacs Mathias Dahl
2006-12-20 15:42 ` aartist
2006-12-20 16:02   ` Mathias Dahl
2006-12-20 16:49     ` Mathias Dahl [this message]
2006-12-20 16:59       ` aartist
2006-12-20 17:13         ` Mathias Dahl
2006-12-20 17:46       ` Lennart Borgman
     [not found]       ` <mailman.2154.1166636803.2155.help-gnu-emacs@gnu.org>
2006-12-20 17:51         ` Mathias Dahl
2006-12-20 20:23     ` Magnus Henoch
     [not found]     ` <mailman.2158.1166646507.2155.help-gnu-emacs@gnu.org>
2006-12-21  9:04       ` Mathias Dahl
2006-12-20 19:49 ` jason haslup
     [not found] ` <mailman.2157.1166644516.2155.help-gnu-emacs@gnu.org>
2006-12-21  9:03   ` Mathias Dahl
2006-12-21 16:42     ` Hadron Quark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=umz5izf5h.fsf@gmail.com \
    --to=brakjoller@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).