help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Very simple IDE for programming newbie


From: Sean McAfee
Subject: Re: Very simple IDE for programming newbie
Date: Sun, 03 Jan 2010 16:02:07 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin)

Peter Dyballa <Peter_Dyballa@Web.DE> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]