From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Re: Building a database interface in Emacs Date: Wed, 20 Dec 2006 18:46:43 +0100 Message-ID: <45897703.7090007@student.lu.se> References: <1166629368.130069.193700@80g2000cwy.googlegroups.com> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1166636820 1905 80.91.229.10 (20 Dec 2006 17:47:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Dec 2006 17:47:00 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 20 18:46:58 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 1Gx5Wr-0002UF-Pp for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Dec 2006 18:46:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gx5Wr-0003GQ-Be for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Dec 2006 12:46:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gx5Wb-0003Dr-1r for help-gnu-emacs@gnu.org; Wed, 20 Dec 2006 12:46:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gx5Wa-0003CR-7i for help-gnu-emacs@gnu.org; Wed, 20 Dec 2006 12:46:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gx5WZ-0003C6-Ta for help-gnu-emacs@gnu.org; Wed, 20 Dec 2006 12:46:39 -0500 Original-Received: from [80.76.149.213] (helo=ch-smtp02.sth.basefarm.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Gx5WZ-00017S-D4 for help-gnu-emacs@gnu.org; Wed, 20 Dec 2006 12:46:39 -0500 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:61153 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1Gx5WX-0007iG-8V; Wed, 20 Dec 2006 18:46:38 +0100 User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) Original-To: Mathias Dahl In-Reply-To: X-Antivirus: avast! (VPS 0661-0, 2006-12-20), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1Gx5WX-0007iG-8V. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1Gx5WX-0007iG-8V 4f53a3f137d833d876a063e4ec09c8ef 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:39777 Archived-At: Mathias Dahl wrote: > 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? > Perhaps these helps? (info "(elisp) Filter Functions") (info "(elisp) Accepting Output") (info "(elisp) Sentinels")