From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: Open compilation window only on errors?
Date: Mon, 29 Sep 2003 16:10:55 -0600 [thread overview]
Message-ID: <3F78ADEF.8070300@yahoo.com> (raw)
In-Reply-To: mailman.813.1064689050.21628.help-gnu-emacs@gnu.org
Matthew Calhoun wrote:
> When I compile using M-x compile, Emacs opens a new window for the
> compilation buffer when it's finished.
Really? I think it displays the *compilation* buffer immediately. You can see
that with `M-x compile RET C-a C-k sleep 10 RET'.
> This is great when there are
> warnings or errors, but when there aren't I would like to prevent Emacs
> from opening the new window, and instead maybe just put a message in the
> minibuffer indicating that compilation was successful. Is there a
> variable I can set for this, or does anyone have elisp code that does
> something similar?
Well, you could undisplay the window when the compilation finishes by calling
delete-window or bury-buffer inside your own compilation-finish-function. You
can access the EXIT-STATUS arg of compilation-handle-exit (which should be 0 for
a successful command), since Emacs variables have dynamic scope.
Or maybe you could do that inside
(defadvice compile (after delete-window activate) ...)
and then (re)display the buffer within your compilation-finish-function.
--
Kevin Rodgers
next prev parent reply other threads:[~2003-09-29 22:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.813.1064689050.21628.help-gnu-emacs@gnu.org>
2003-09-29 9:45 ` Open compilation window only on errors? Jens Schmidt
2003-10-13 8:05 ` Matthew Calhoun
2003-09-29 14:45 ` François Fleuret
2003-09-29 22:10 ` Kevin Rodgers [this message]
[not found] <mailman.1571.1066032399.21628.help-gnu-emacs@gnu.org>
2003-10-13 17:24 ` Kevin Rodgers
2003-09-27 18:57 Matthew Calhoun
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F78ADEF.8070300@yahoo.com \
--to=ihs_4664@yahoo.com \
/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.
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).