GNU bug report logs - #19711
25.0.50; (ad-is-adviced sym) is inconsistent with (advice--p (advice--symbol-function sym))

Previous Next

Package: emacs;

Reported by: Oleh Krehel <ohwoeowho <at> gmail.com>

Date: Wed, 28 Jan 2015 13:59:01 UTC

Severity: normal

Tags: moreinfo

Found in version 25.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#19711: closed (25.0.50; (ad-is-adviced sym) is inconsistent
 with (advice--p (advice--symbol-function sym)))
Date: Mon, 16 Aug 2021 17:40:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 16 Aug 2021 13:39:31 -0400
with message-id <jwv5yw5z3vx.fsf-monnier+emacsbugs <at> gnu.org>
and subject line Re: bug#19711: 25.0.50; (ad-is-adviced sym) is inconsistent with (advice--p (advice--symbol-function sym))
has caused the debbugs.gnu.org bug report #19711,
regarding 25.0.50; (ad-is-adviced sym) is inconsistent with (advice--p (advice--symbol-function sym))
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
19711: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19711
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Oleh Krehel <ohwoeowho <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; (ad-is-adviced sym) is inconsistent with (advice--p
 (advice--symbol-function sym))
Date: Wed, 28 Jan 2015 14:55:01 +0100
`ad-is-adviced' expands to:

    (get 'foo 'ad-advice-info)

This code will not detect if the function `foo' is being instrumented
with `elp-instrument-package' (which is a form of advice).

On the other hand, this code from `advice-remove' will work:

    (advice--p (advice--symbol-function 'foo))

To summarize, functions instrumented by elp aren't recognized as adviced
by `ad-is-advised', even though :around advice: even shows up in the
docstring.

A fix could be to change `ad-is-adviced' to expand to either

    (or (get 'foo 'ad-advice-info)
        (get 'foo 'elp-info))

or

    (advice--p (advice--symbol-function 'foo))



[Message part 3 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 19711-done <at> debbugs.gnu.org, Oleh Krehel <ohwoeowho <at> gmail.com>
Subject: Re: bug#19711: 25.0.50; (ad-is-adviced sym) is inconsistent with
 (advice--p (advice--symbol-function sym))
Date: Mon, 16 Aug 2021 13:39:31 -0400
> I think this was basically fixed by:
>
> commit 6e2d6d54e1236216462c13655ea1fe573d9672e7
> Author:     Stefan Monnier <monnier <at> iro.umontreal.ca>
> AuthorDate: Fri Jul 14 11:27:21 2017 -0400

Agreed, closing,


        Stefan



This bug report was last modified 3 years and 340 days ago.

Previous Next


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