Subject: bug#6892: Please add a way to jump to advices

From: Stefan Monnier <[email-masked]>
Date: Mon, 09 May 2022 12:50:22 -0400

> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
>
> This seems to still be the case with advice-add:
>
> (defun bar ()
>   (interactive)
>   (forward-line 1))
>
> (advice-add 'bar :before (lambda () (forward-line 1)))

But it should work if you do

    (advice-add 'bar :before #'bar--skip-line)
    (defun bar--skip-line () (forward-line 1))

> I'm sure this has come up before -- does advice add no pointers (to
> load-history, I guess?) that the help system could pick up?

`define-advice` could, but `advice-add` is definitely not limited to
uses at top-level, so it shouldn't mess with `load-history`.

        Stefan