From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Xu Newsgroups: gmane.emacs.help Subject: Re: How to keep *compilation* buffer in background Date: Sun, 26 Oct 2008 02:12:09 +0800 Organization: the Church of Emacs Message-ID: References: <0f772658-4089-4f39-8407-af6b33637138@t42g2000hsg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1224959622 5601 80.91.229.12 (25 Oct 2008 18:33:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Oct 2008 18:33:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 25 20:34:43 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KtnyB-00079F-L1 for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Oct 2008 20:34:40 +0200 Original-Received: from localhost ([127.0.0.1]:54246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ktnx5-0007C3-AG for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Oct 2008 14:33:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ktnwm-0007Bo-UL for help-gnu-emacs@gnu.org; Sat, 25 Oct 2008 14:33:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ktnwk-0007BZ-H7 for help-gnu-emacs@gnu.org; Sat, 25 Oct 2008 14:33:11 -0400 Original-Received: from [199.232.76.173] (port=39353 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ktnwk-0007BW-Aj for help-gnu-emacs@gnu.org; Sat, 25 Oct 2008 14:33:10 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:56571 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ktnwk-0002RC-D3 for help-gnu-emacs@gnu.org; Sat, 25 Oct 2008 14:33:10 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ktnwe-0006JQ-JQ for help-gnu-emacs@gnu.org; Sat, 25 Oct 2008 18:33:04 +0000 Original-Received: from 221.221.160.224 ([221.221.160.224]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Oct 2008 18:33:04 +0000 Original-Received: from william.xwl by 221.221.160.224 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Oct 2008 18:33:04 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 221.221.160.224 User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin) Cancel-Lock: sha1:ynvszOu0+nAa4bjvbs6lfAmIK7s= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:59162 Archived-At: "stephan.zimmer" 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