From: William Xu <william.xwl@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to keep *compilation* buffer in background
Date: Sun, 26 Oct 2008 02:12:09 +0800 [thread overview]
Message-ID: <m2ej24tuh2.fsf@gmail.com> (raw)
In-Reply-To: 0f772658-4089-4f39-8407-af6b33637138@t42g2000hsg.googlegroups.com
"stephan.zimmer" <stephan.zimmer@googlemail.com> writes:
> After invoking the "compile" command the *compilation* buffer pops up
> and occupies half of the emacs window. Is there any way to configure
> this command such that the buffer pops up in the background?
> Alternatively, is it possible to automatically let the buffer be
> closed after a successful compilation?
I got this from somewhere on emacswiki, slightly modified:
(defun xwl-compilation-exit-autoclose (status code msg)
(if (and (eq status 'exit) (zerop code))
(progn
(run-at-time 0.5
nil
(lambda ()
(delete-window
(get-buffer-window
(get-buffer "*compilation*")))))
(message "Compilation succeed"))
(message "Compilation failed"))
(cons msg code))
(setq compilation-exit-message-function 'xwl-compilation-exit-autoclose)
--
William
http://williamxu.net9.org
prev parent reply other threads:[~2008-10-25 18:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 13:19 How to keep *compilation* buffer in background stephan.zimmer
2008-10-21 15:11 ` Eli Zaretskii
2008-10-21 15:48 ` Drew Adams
[not found] ` <mailman.1720.1224604115.25473.help-gnu-emacs@gnu.org>
2008-10-22 11:25 ` stephan.zimmer
2008-10-25 18:12 ` William Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2ej24tuh2.fsf@gmail.com \
--to=william.xwl@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.