* I need to turn off defadvice warnings
@ 2012-01-06 22:47 jidanni
2011-12-28 21:22 ` bug#10392: mention ad-handle-definition startup warnings jidanni
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: jidanni @ 2012-01-06 22:47 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: yamaoka
A friend told me to use
(defadvice gnus-summary-select-article-buffer ...
But now I get
ad-handle-definition: `gnus-summary-select-article-buffer' got redefined
warnings.
Is there anyway to turn them off?
(info "(elisp) Advising Functions")
doesn't mention the warnings!
Can I turn them off for just this one advice?
Or is the only way rewrite the whole function with defun?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#10392: mention ad-handle-definition startup warnings
@ 2011-12-28 21:22 ` jidanni
2012-01-06 20:15 ` Glenn Morris
2012-01-06 22:47 ` bug#10392: I need to turn off defadvice warnings jidanni
0 siblings, 2 replies; 6+ messages in thread
From: jidanni @ 2011-12-28 21:22 UTC (permalink / raw)
To: 10392; +Cc: yamaoka
X-Debbugs-Cc: yamaoka@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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#10392: mention ad-handle-definition startup warnings
2011-12-28 21:22 ` bug#10392: mention ad-handle-definition startup warnings jidanni
@ 2012-01-06 20:15 ` Glenn Morris
2012-01-06 22:47 ` bug#10392: I need to turn off defadvice warnings jidanni
1 sibling, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2012-01-06 20:15 UTC (permalink / raw)
To: 10392-done
tags 10392 notabug
stop
jidanni@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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#10392: I need to turn off defadvice warnings
2011-12-28 21:22 ` bug#10392: mention ad-handle-definition startup warnings jidanni
2012-01-06 20:15 ` Glenn Morris
@ 2012-01-06 22:47 ` jidanni
1 sibling, 0 replies; 6+ messages in thread
From: jidanni @ 2012-01-06 22:47 UTC (permalink / raw)
To: 10392, help-gnu-emacs; +Cc: yamaoka
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))))
;)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: I need to turn off defadvice warnings
2012-01-06 22:47 I need to turn off defadvice warnings jidanni
2011-12-28 21:22 ` bug#10392: mention ad-handle-definition startup warnings jidanni
@ 2012-01-06 22:47 ` jidanni
2012-01-06 23:49 ` Tassilo Horn
2 siblings, 0 replies; 6+ messages in thread
From: jidanni @ 2012-01-06 22:47 UTC (permalink / raw)
Cc: yamaoka
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))))
;)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: I need to turn off defadvice warnings
2012-01-06 22:47 I need to turn off defadvice warnings jidanni
2011-12-28 21:22 ` bug#10392: mention ad-handle-definition startup warnings jidanni
2012-01-06 22:47 ` jidanni
@ 2012-01-06 23:49 ` Tassilo Horn
2 siblings, 0 replies; 6+ messages in thread
From: Tassilo Horn @ 2012-01-06 23:49 UTC (permalink / raw)
To: help-gnu-emacs
jidanni@jidanni.org writes:
> A friend told me to use
> (defadvice gnus-summary-select-article-buffer ...
>
> But now I get
> ad-handle-definition: `gnus-summary-select-article-buffer' got redefined
> warnings.
>
> Is there anyway to turn them off?
Don't simply turn off a warning, but check what causes it. In your
case, the warning tells you that
gnus-summary-select-article-buffer
already has an advice on it. Your new defadvice deactivates the old
piece of advice and activates the new one.
Bye,
Tassilo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-01-06 23:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-06 22:47 I need to turn off defadvice warnings jidanni
2011-12-28 21:22 ` bug#10392: mention ad-handle-definition startup warnings jidanni
2012-01-06 20:15 ` Glenn Morris
2012-01-06 22:47 ` bug#10392: I need to turn off defadvice warnings jidanni
2012-01-06 22:47 ` jidanni
2012-01-06 23:49 ` Tassilo Horn
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.