[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
compilation/grep buffer advice
From: |
Phil Carmody |
Subject: |
compilation/grep buffer advice |
Date: |
Thu, 07 Aug 2008 17:25:12 +0300 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
I like the idea of burying the result of a successful
compilation, but keeping errors visible, and started
using the code snippet that was recently posted here
to achieve that.
However, I got annoyed by it burying grep results too.
This quick hack overcomes that limitation, but I'm not
sure what kind of condition to include to test the buffer
name:
(setq compilation-finish-function
(lambda (buf str)
(if (string-match "compilation" (buffer-name buf))
(if (string-match "exited abnormally" str)
(message "compilation errors, press C-x ` to visit")
(run-at-time 1 nil 'delete-windows-on buf)
(message "NO COMPILATION ERRORS!"))
(message "didn't look like a compilation"))))
What other kinds of functions apart from grep use compilation
mode? Is it better to have 'compilation' a special case to be
handled by optionally burying, or 'grep' the special case that
does nothing?
Phil
--
Dear aunt, let's set so double the killer delete select all.
-- Microsoft voice recognition live demonstration
- compilation/grep buffer advice,
Phil Carmody <=