all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: help-gnu-emacs@gnu.org
Subject: Re: I need to turn off defadvice warnings
Date: Fri, 13 Jan 2012 14:11:23 +0100	[thread overview]
Message-ID: <87vcofu4qs.fsf@tsdh.uni-koblenz.de> (raw)
In-Reply-To: 87pqeosc85.fsf@jidanni.org

jidanni@jidanni.org writes:

>>> But now I get
>>> ad-handle-definition: `gnus-summary-select-article-buffer' got redefined
>>> warnings.
>>> 
>>> Is there anyway to turn them off?
>
> TH> Don't simply turn off a warning, but check what causes it.  In your
> TH> case, the warning tells you that
>
> TH>   gnus-summary-select-article-buffer
>
> TH> already has an advice on it.  Your new defadvice deactivates the old
> TH> piece of advice and activates the new one.
>
> Well,
>
> that would be nice,
>
> if that was the case.
>
> Unfortunately it is not,
> as far as I can tell.

Yeah, I was wrong.  You can put as many advices at a function as you
want.

But at least, I know what causes the warning.  Here's a recipe:

--8<---------------cut here---------------start------------->8---
(defun foo-foo ())
(defadvice foo-foo (before foo activate))
(defun foo-foo ())
--8<---------------cut here---------------end--------------->8---

So you first define an advice on the function `foo-foo', and then the
function gets redefined.  In your case,
`gnus-summary-select-article-buffer' gets redefined at some point in
time.  Not sure why, though...

What you can try is this:

  M-: (setq ad-redefinition-action 'error)
  M-x toggle-debug-on-error RET
  M-x gnus RET

I suspect something first loads the gnus version bundled with emacs, and
then you load the git version.  But I cannot find the source of the
problem in your configs (which are pretty confusing.) :-)

Bye,
Tassilo




  reply	other threads:[~2012-01-13 13:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1325.1325893818.15002.help-gnu-emacs@gnu.org>
2012-01-13  0:00 ` I need to turn off defadvice warnings jidanni
2012-01-13 13:11   ` Tassilo Horn [this message]
2012-01-06 22:47 jidanni
2012-01-06 22:47 ` jidanni
2012-01-06 23:49 ` Tassilo Horn

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=87vcofu4qs.fsf@tsdh.uni-koblenz.de \
    --to=tassilo@member.fsf.org \
    --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.