unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Building a database interface in Emacs
Date: Wed, 20 Dec 2006 18:46:43 +0100	[thread overview]
Message-ID: <45897703.7090007@student.lu.se> (raw)
In-Reply-To: <umz5izf5h.fsf@gmail.com>

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

  parent reply	other threads:[~2006-12-20 17:46 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
2006-12-20 16:59       ` aartist
2006-12-20 17:13         ` Mathias Dahl
2006-12-20 17:46       ` Lennart Borgman [this message]
     [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=45897703.7090007@student.lu.se \
    --to=lennart.borgman.073@student.lu.se \
    --cc=help-gnu-emacs@gnu.org \
    /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).