From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Amin Bandali Newsgroups: gmane.emacs.help Subject: Re: Show *compilation* only if build did not succeed Date: Sun, 23 Dec 2018 09:59:58 -0500 Message-ID: <8736qos2z5.fsf@aminb.org> References: <87h8f5fvdo.fsf@aminb.org> <87ftupxxdl.fsf@aminb.org> <87k1k1tm3x.fsf@aminb.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1545577127 28702 195.159.176.226 (23 Dec 2018 14:58:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 23 Dec 2018 14:58:47 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 23 15:58:43 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gb5DF-0007LU-5T for geh-help-gnu-emacs@m.gmane.org; Sun, 23 Dec 2018 15:58:41 +0100 Original-Received: from localhost ([::1]:38908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gb5FM-0002PD-0i for geh-help-gnu-emacs@m.gmane.org; Sun, 23 Dec 2018 10:00:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gb5En-0002P4-Pv for help-gnu-emacs@gnu.org; Sun, 23 Dec 2018 10:00:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gb5Ea-0001w3-8j for help-gnu-emacs@gnu.org; Sun, 23 Dec 2018 10:00:17 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gb5EV-0001oF-OM; Sun, 23 Dec 2018 09:59:59 -0500 Original-Received: from [2607:fea8:3ba0:f85::5] (port=50990 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gb5EV-0002qv-Jx; Sun, 23 Dec 2018 09:59:59 -0500 In-Reply-To: (Stefan Monnier's message of "Sun, 23 Dec 2018 09:29:31 -0500") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:119033 Archived-At: Hi Stefan, On 2018-12-23 9:29 AM, Stefan Monnier wrote: >> Out of curiosity, is there any way to silence the =E2=80=9Cad-handle-def= inition: >> =E2=80=98compilation-start=E2=80=99 got redefined=E2=80=9D warning local= ly? I tried wrapping my >> workaround in a (let ((ad-redefinition-action 'accept)) ...), but that >> doesn=E2=80=99t seem to do it. > > ad-redefinition-action is consulted when compilation-start is defined > (i.e. when loading compile.el), that's why your let has no effect. > > If you use the newer `advice-add` instead of the older `defadvice` you > shouldn't get any warning (it's one of the "features" I didn't bother > to port). That makes sense, thanks. And TIL about advice-add! On a side note, it seems wrapping the workaround in a (with-eval-after-load 'compile ...) also suppresses the warning, without needing ad-redefinition-action set. > But you can also just do > > (setq ad-redefinition-action 'accept) Indeed. My reasoning was to try and minimize its effect in my init file so that I would still be able to see the warning if triggered elsewhere. > > > Stefan > Best, amin