From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: I need to turn off defadvice warnings Date: Fri, 13 Jan 2012 14:11:23 +0100 Message-ID: <87vcofu4qs.fsf@tsdh.uni-koblenz.de> References: <87pqeosc85.fsf@jidanni.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1326460329 12154 80.91.229.12 (13 Jan 2012 13:12:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 13 Jan 2012 13:12:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 13 14:12:04 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RlgvM-0002Mb-Gn for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Jan 2012 14:12:04 +0100 Original-Received: from localhost ([::1]:54940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlgvG-0003rl-9n for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Jan 2012 08:11:58 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:52044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rlgv7-0003rg-AX for help-gnu-emacs@gnu.org; Fri, 13 Jan 2012 08:11:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rlgv1-0007Bf-IH for help-gnu-emacs@gnu.org; Fri, 13 Jan 2012 08:11:49 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:48706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rlgv1-0007BW-7N for help-gnu-emacs@gnu.org; Fri, 13 Jan 2012 08:11:43 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Rlguy-0002Ba-NV for help-gnu-emacs@gnu.org; Fri, 13 Jan 2012 14:11:40 +0100 Original-Received: from tsdh.uni-koblenz.de ([141.26.67.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 Jan 2012 14:11:40 +0100 Original-Received: from tassilo by tsdh.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 Jan 2012 14:11:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 53 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: tsdh.uni-koblenz.de User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:NF8cPws/TVn7EsjGmo+fL0KYFmQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:83480 Archived-At: 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