all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Amin Bandali <bandali@gnu.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Show *compilation* only if build did not succeed
Date: Sun, 23 Dec 2018 09:59:58 -0500	[thread overview]
Message-ID: <8736qos2z5.fsf@aminb.org> (raw)
In-Reply-To: <jwvsgyouxmd.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 23 Dec 2018 09:29:31 -0500")

Hi Stefan,

On 2018-12-23  9:29 AM, Stefan Monnier wrote:
>> Out of curiosity, is there any way to silence the “ad-handle-definition:
>> ‘compilation-start’ got redefined” warning locally?  I tried wrapping my
>> workaround in a (let ((ad-redefinition-action 'accept)) ...), but that
>> doesn’t 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



      reply	other threads:[~2018-12-23 14:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-22 15:12 Show *compilation* only if build did not succeed Amin Bandali
2018-12-22 16:49 ` Stefan Monnier
2018-12-22 17:52   ` Amin Bandali
2018-12-22 18:21     ` Stefan Monnier
2018-12-22 19:09       ` Amin Bandali
2018-12-23 14:29         ` Stefan Monnier
2018-12-23 14:59           ` Amin Bandali [this message]

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=8736qos2z5.fsf@aminb.org \
    --to=bandali@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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.