[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compilation buffer
From: |
Thien-Thi Nguyen |
Subject: |
Re: Compilation buffer |
Date: |
Thu, 25 Nov 2010 15:34:14 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
() Andrea Crotti <andrea.crotti.0@gmail.com>
() Thu, 25 Nov 2010 00:17:00 +0100
I stole this nice trick somewhere
(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 |
ompile-buffer-if-successful)
|
And actually it's very nice, in short if the co | ilation succeeds the
buffer is killed, but there are two small probl | s:
|
- not just "compile" uses compilation mode, for | xample grep also does
but then the buffer disappears too soon. |
Is there a way to distiguish between those di | erent things?
|
The first arg to the function is the buffer. ------+
You can test that.
- Compilation buffer, Andrea Crotti, 2010/11/24
- Re: Compilation buffer, Burton Samograd, 2010/11/24
- Re: Compilation buffer,
Thien-Thi Nguyen <=
- Re: Compilation buffer, Andrea Crotti, 2010/11/25
- Re: Compilation buffer, Thien-Thi Nguyen, 2010/11/25
- Re: Compilation buffer, Andrea Crotti, 2010/11/25
- Re: Compilation buffer, Thien-Thi Nguyen, 2010/11/26
- Has anything thought of this before: having clipboard and deleted text separate, Maindoor, 2010/11/28
- Re: Has anything thought of this before: having clipboard and deleted text separate, PJ Weisberg, 2010/11/29