unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Compilation buffer
@ 2010-11-24 23:17 Andrea Crotti
  2010-11-24 23:32 ` Burton Samograd
  2010-11-25 14:34 ` Thien-Thi Nguyen
  0 siblings, 2 replies; 10+ messages in thread
From: Andrea Crotti @ 2010-11-24 23:17 UTC (permalink / raw)
  To: help-gnu-emacs

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
                        'kill-buffer
                        buffer)))
  
  (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 macro/function?




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-11-29  7:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-24 23:17 Compilation buffer Andrea Crotti
2010-11-24 23:32 ` Burton Samograd
2010-11-25  7:12   ` Deniz Dogan
2010-11-25 14:34 ` Thien-Thi Nguyen
2010-11-25 16:57   ` Andrea Crotti
2010-11-25 21:05     ` Thien-Thi Nguyen
2010-11-25 23:22       ` Andrea Crotti
2010-11-26  6:59         ` Thien-Thi Nguyen
2010-11-29  4:42           ` Has anything thought of this before: having clipboard and deleted text separate Maindoor
2010-11-29  7:01             ` PJ Weisberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).