From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Display compilation buffer only if compilation failed Date: Sat, 11 Feb 2012 09:29:35 -0800 Message-ID: <2A710B90B5974D5F8EFD545F7BADC5B1@us.oracle.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1328981393 9444 80.91.229.3 (11 Feb 2012 17:29:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Feb 2012 17:29:53 +0000 (UTC) To: "=?iso-8859-1?Q?'Aur=E9lien_Aptel'?=" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 11 18:29:53 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RwGlk-0007s9-HF for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Feb 2012 18:29:52 +0100 Original-Received: from localhost ([::1]:40888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwGlk-0000S2-0E for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Feb 2012 12:29:52 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:37743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwGle-0000Rj-KI for help-gnu-emacs@gnu.org; Sat, 11 Feb 2012 12:29:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwGld-0000vD-J5 for help-gnu-emacs@gnu.org; Sat, 11 Feb 2012 12:29:46 -0500 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:38835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwGld-0000v9-Cb for help-gnu-emacs@gnu.org; Sat, 11 Feb 2012 12:29:45 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q1BHTglF026331; Sat, 11 Feb 2012 17:29:43 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q1BHTfwi018802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Feb 2012 17:29:42 GMT Original-Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q1BHTfWD008653; Sat, 11 Feb 2012 11:29:41 -0600 Original-Received: from dradamslap1 (/10.159.53.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 11 Feb 2012 09:29:41 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Aczo25dAshLjwo5WSTOBEib3c5JspQABlo0w X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.4F36A587.003A,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83705 Archived-At: > (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'.