From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "CarlC" Newsgroups: gmane.emacs.help Subject: Checking Process Status Date: Mon, 03 Feb 2003 14:53:36 GMT Organization: Road Runner - Texas Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1044284149 11071 80.91.224.249 (3 Feb 2003 14:55:49 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 3 Feb 2003 14:55:49 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18fi0f-0002sJ-00 for ; Mon, 03 Feb 2003 15:55:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18fi19-0000Si-05 for gnu-help-gnu-emacs@m.gmane.org; Mon, 03 Feb 2003 09:56:15 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed-east.nntpserver.com!nntpserver.com!news-west.rr.com!cyclone.austin.rr.com!twister.austin.rr.com.POSTED!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Original-NNTP-Posting-Host: 24.153.208.137 Original-X-Complaints-To: abuse@rr.com Original-X-Trace: twister.austin.rr.com 1044284016 24.153.208.137 (Mon, 03 Feb 2003 08:53:36 CST) Original-NNTP-Posting-Date: Mon, 03 Feb 2003 08:53:36 CST Original-Xref: shelby.stanford.edu gnu.emacs.help:109721 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6234 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6234 I am trying to make "compile" synchronous. I am defining a function that does a compile and looks at the *compilation* buffer. I need to wait until the compile is finished before looking at this buffer. I think that my problem is not knowing how to check the return of process-status. If I do (setq stat (process-status "compilation")) right after the compile, it gets set to a value "run". I don't know if this is a string or other type of value. These are a couple of things that I have tried: (while (equal (process-status "compilation") "run") (sleep-for .5)) (while (process-status "compilation") (sleep-for .5)) The first one fails the first time through, before the compile has finished. The second one never finishes until I C-g, even though (process-status "compilation") seems to return nil after the compilation finishes. Does anybody have an idea of what I need to do here? Or is there a better way of accomplishing this. The compiles normally take a fraction of a second to complete, so this isn't going to cause the user any problem to have emacs wait. I would hate to hardcode a delay. Thanks.