GNU bug report logs - #10392
mention ad-handle-definition startup warnings

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Wed, 28 Dec 2011 21:26:02 UTC

Severity: minor

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10392 in the body.
You can then email your comments to 10392 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to yamaoka <at> jpl.org, bug-gnu-emacs <at> gnu.org:
bug#10392; Package emacs. (Wed, 28 Dec 2011 21:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to yamaoka <at> jpl.org, bug-gnu-emacs <at> gnu.org. (Wed, 28 Dec 2011 21:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Cc: yamaoka <at> jpl.org
Subject: mention ad-handle-definition startup warnings
Date: Thu, 29 Dec 2011 05:22:55 +0800
X-Debbugs-Cc: yamaoka <at> jpl.org

(info "(elisp) Advising Functions")
doesn't mention that e.g., putting

(defadvice gnus-summary-select-article-buffer (after jump-to-html-part
						     activate)
  "Jump to an html part that emacs-w3m rendered, if any."
  (unless (get-text-property (point) 'mm-inline-text-html-with-w3m)
    (let ((pos (text-property-any (point-min) (point-max)
				  'mm-inline-text-html-with-w3m t)))
      (gnus-goto-char pos))))

in .gnus.el will cause startup warnings

   ad-handle-definition: `gnus-summary-select-article-buffer' got redefined

for the rest of one's life, with no mention of workarounds to turn them
off either.




Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 06 Jan 2012 20:20:01 GMT) Full text and rfc822 format available.

Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Fri, 06 Jan 2012 20:20:01 GMT) Full text and rfc822 format available.

Notification sent to jidanni <at> jidanni.org:
bug acknowledged by developer. (Fri, 06 Jan 2012 20:20:02 GMT) Full text and rfc822 format available.

Message #12 received at 10392-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 10392-done <at> debbugs.gnu.org
Subject: Re: bug#10392: mention ad-handle-definition startup warnings
Date: Fri, 06 Jan 2012 15:15:25 -0500
tags 10392 notabug
stop

jidanni <at> jidanni.org wrote:

> doesn't mention that e.g., putting
>
> (defadvice gnus-summary-select-article-buffer (after jump-to-html-part
> 						     activate)
>   "Jump to an html part that emacs-w3m rendered, if any."
>   (unless (get-text-property (point) 'mm-inline-text-html-with-w3m)
>     (let ((pos (text-property-any (point-min) (point-max)
> 				  'mm-inline-text-html-with-w3m t)))
>       (gnus-goto-char pos))))
>
> in .gnus.el will cause startup warnings
>
>    ad-handle-definition: `gnus-summary-select-article-buffer' got redefined

By itself, it does not.

> for the rest of one's life, with no mention of workarounds to turn them
> off either.

C-h v ad-redefinition-action


Ask on help-gnu-emacs if you need more explanation about using advice.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10392; Package emacs. (Fri, 06 Jan 2012 23:17:01 GMT) Full text and rfc822 format available.

Message #15 received at 10392 <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: 10392 <at> debbugs.gnu.org
Cc: yamaoka <at> jpl.org
Subject: Re: I need to turn off defadvice warnings
Date: Sat, 07 Jan 2012 06:47:13 +0800
OK,
(info "(elisp) Advising Functions")
should mention that advising functions will produce warnings.
And to turn off the warnings, one needs to (setq ad-redefinition-action 'accept),
and one cannot just turn them off for one advice, with e.g., let().

;(let ((ad-redefinition-action 'accept))
  (setq ad-redefinition-action 'accept)
  (defadvice gnus-summary-select-article-buffer (after jump-to-html-part
						     activate)
  "Jump to an html part that emacs-w3m rendered, if any."
  (unless (get-text-property (point) 'mm-inline-text-html-with-w3m)
    (let ((pos (text-property-any (point-min) (point-max)
				  'mm-inline-text-html-with-w3m t)))
      (gnus-goto-char pos))))
;)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 04 Feb 2012 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 133 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.