From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.help Subject: Re: Building a database interface in Emacs Date: Wed, 20 Dec 2006 17:49:14 +0100 Message-ID: References: <1166629368.130069.193700@80g2000cwy.googlegroups.com> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1166636444 565 80.91.229.10 (20 Dec 2006 17:40:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Dec 2006 17:40:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 20 18:40:42 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1Gx5Qe-0001Dq-GI for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Dec 2006 18:40:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gx5Qd-0005VK-W2 for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Dec 2006 12:40:32 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsserver.news.garr.it!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-X-Trace: individual.net XJLhjHR8M2QS238oQAamLQTkeF9wHikpKQurTjfreGmJh0pJd6 User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (windows-nt) Cancel-Lock: sha1:tAs6Fy3ay1XlWTN/mGZ1WBLDF+I= Original-Xref: shelby.stanford.edu gnu.emacs.help:144170 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39773 Archived-At: Mathias Dahl 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?