From: "Drew Adams" <drew.adams@oracle.com>
To: "'Aurélien Aptel'" <aurelien.aptel+emacs@gmail.com>,
help-gnu-emacs@gnu.org
Subject: RE: Display compilation buffer only if compilation failed
Date: Sat, 11 Feb 2012 09:29:35 -0800 [thread overview]
Message-ID: <2A710B90B5974D5F8EFD545F7BADC5B1@us.oracle.com> (raw)
In-Reply-To: <CA+5B0FM5LW0uhfqdJj5a0K24_HNNzimJxoAhOq2e3Vv9s2Rutg@mail.gmail.com>
> (defun my-recompile-switch-if-error ()
> (interactive)
> (let ((buf (save-window-excursion ; prevent display-buffer
> (recompile)))) ; returns compilation buffer
After displaying it, AFAICT.
> (when (not (my-compile-success-p buf))
> (display-buffer buf))))
>
> But it doesn't work...
AFAICT, `recompile' invokes `compilation-start', which calls `display-buffer' on
the output buffer.
The doc string of `compilation-start' does not explicitly say that it displays
the buffer. It probably should. The first line should probably state that it
runs compilation command COMMAND _and displays the output_. Some subsequent
doc-string line can bother to mention "(low-level interface)", if that is really
helpful/important.
Consider reporting a doc bug: `M-x report-emacs-bug'.
next prev parent reply other threads:[~2012-02-11 17:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-11 16:38 Display compilation buffer only if compilation failed Aurélien Aptel
2012-02-11 17:29 ` Drew Adams [this message]
2012-02-11 18:06 ` Aurélien Aptel
2012-02-11 18:13 ` Aurélien Aptel
2012-02-11 18:20 ` Drew Adams
2012-02-11 20:24 ` Aurélien Aptel
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=2A710B90B5974D5F8EFD545F7BADC5B1@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=aurelien.aptel+emacs@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.