From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sean McAfee Newsgroups: gmane.emacs.help Subject: Re: Very simple IDE for programming newbie Date: Sun, 03 Jan 2010 16:02:07 -0500 Message-ID: References: <87pr5susfb.fsf@hubble.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1262558989 23923 80.91.229.12 (3 Jan 2010 22:49:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jan 2010 22:49:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 03 23:49:42 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NRZGW-0002Kv-G3 for geh-help-gnu-emacs@m.gmane.org; Sun, 03 Jan 2010 23:49:40 +0100 Original-Received: from localhost ([127.0.0.1]:53833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRZGX-0001oy-2q for geh-help-gnu-emacs@m.gmane.org; Sun, 03 Jan 2010 17:49:41 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Sun, 03 Jan 2010 15:02:08 -0600 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin) Cancel-Lock: sha1:VInLiNOtLoSLLtIUYx57RZxCuPs= Original-Lines: 29 Original-X-Trace: sv3-pOcN/ccuDwCXnHjmk71i+TbC/ycVEarfx2cmbULBsfsC+C49GNWnEtkd2B8AxUcTREfhHtJe1UCU3hK!ahyG1QnA7esqSvZPCaIr7oEKh5Pqtztpds3qSlIkTm9AyC+zIIQY2hFWCCWoj15tV55xgqSNNFKO!8+zv69YbCwifnXoxd0qYZq/meTB0gdtteaRSekQOA+oyQPL+3ypN3OhOa+v+3XT5Lxm8G3U8 Original-X-Complaints-To: www.supernews.com/docs/abuse.html X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 Original-Xref: news.stanford.edu gnu.emacs.help:175964 X-Mailman-Approved-At: Sun, 03 Jan 2010 17:49:10 -0500 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:71039 Archived-At: Peter Dyballa writes: > Am 03.01.2010 um 17:10 schrieb Sean McAfee: >> I know; my question was how to a) know when the asynchronous >> compilation process has finished, and b) tell whether there were any >> errors, so that if there were none, I can immediately launch the >> newly-compiled program in a terminal emulator. > > > The *compilation* buffer's mode-line expresses such things. Actually, by "I" above I meant the special compilation function I'm planning to write. Something like: (defun my-compile () (interactive) (compile (format "gcc %s" (file-name-nondirectory (buffer-file-name)))) (when-compilation-is-complete (lambda () (when (not (there-were-errors)) (kill-buffer "*term*") (term "./a.out"))))) What I'm not quite clear on at the moment is how to write the when-compilation-is-complete and there-were-errors functions. Actually, for there-were-errors I could obviously parse the content of the *compilation* buffer, but I was hoping the same information might be available more directly.