[Top][All Lists]

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

Compilation buffer

From: Andrea Crotti
Subject: Compilation buffer
Date: Thu, 25 Nov 2010 00:17:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin)

I stole this nice trick somewhere

--8<---------------cut here---------------start------------->8---
  (defun kill-compile-buffer-if-successful (buffer string)
    (if (string-match "finished" string)
        (run-with-timer 1 nil
  (add-hook 'compilation-finish-functions 'kill-compile-buffer-if-successful)
--8<---------------cut here---------------end--------------->8---

And actually it's very nice, in short if the compilation succeeds the
buffer is killed, but there are two small problems:

- not just "compile" uses compilation mode, for example grep also does
  but then the buffer disappears too soon.
  Is there a way to distiguish between those different things?

- I would also like to see warnings if there are, so the "finished"
  maybe it's not enough, here now other ways that just doing
  "string-matching" right?

Another thing it would be nice is a way to jump, from everywhere, to the
next error/warning.

Now I have to
- go to the compilation buffer
- go to the next error
- press Enter

Is there some function already to automate it or should I create a 

reply via email to

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