unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to keep *compilation* buffer in background
@ 2008-10-21 13:19 stephan.zimmer
  2008-10-21 15:11 ` Eli Zaretskii
  2008-10-25 18:12 ` William Xu
  0 siblings, 2 replies; 5+ messages in thread
From: stephan.zimmer @ 2008-10-21 13:19 UTC (permalink / raw)
  To: help-gnu-emacs

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?


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

* Re: How to keep *compilation* buffer in background
  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-25 18:12 ` William Xu
  1 sibling, 2 replies; 5+ messages in thread
From: Eli Zaretskii @ 2008-10-21 15:11 UTC (permalink / raw)
  To: help-gnu-emacs

> From: "stephan.zimmer" <stephan.zimmer@googlemail.com>
> Date: Tue, 21 Oct 2008 06:19:34 -0700 (PDT)
> 
> 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?

Not exactly what you asked, but maybe customize
compilation-window-height to a small value, such that the window does
not annoy you too much.




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

* RE: How to keep *compilation* buffer in background
  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>
  1 sibling, 0 replies; 5+ messages in thread
From: Drew Adams @ 2008-10-21 15:48 UTC (permalink / raw)
  To: 'Eli Zaretskii', help-gnu-emacs

> > 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?
> 
> Not exactly what you asked, but maybe customize
> compilation-window-height to a small value, such that the window does
> not annoy you too much.

There's probably a simple solution, but if you don't find one: 

You could make it display as a special-display buffer with its own display
function that either doesn't display it or displays it in an invisible frame or
something.

(add-to-list
  'special-display-buffer-names
  (list "*compilation*" 'my-display-fn))

(defun my-display-fn (buf &optional args)...)
 





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

* Re: How to keep *compilation* buffer in background
       [not found]   ` <mailman.1720.1224604115.25473.help-gnu-emacs@gnu.org>
@ 2008-10-22 11:25     ` stephan.zimmer
  0 siblings, 0 replies; 5+ messages in thread
From: stephan.zimmer @ 2008-10-22 11:25 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks for your answers. I found a hint in the emacs wiki (http://
www.emacswiki.org/emacs/CompileCommand) using the compilation-finish-
functions hook.

Stephan


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

* Re: How to keep *compilation* buffer in background
  2008-10-21 13:19 How to keep *compilation* buffer in background stephan.zimmer
  2008-10-21 15:11 ` Eli Zaretskii
@ 2008-10-25 18:12 ` William Xu
  1 sibling, 0 replies; 5+ messages in thread
From: William Xu @ 2008-10-25 18:12 UTC (permalink / raw)
  To: help-gnu-emacs

"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





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

end of thread, other threads:[~2008-10-25 18:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).