GNU bug report logs - #6892
Please add a way to jump to advices

Previous Next

Package: emacs;

Reported by: Ken Hori <fplemma <at> gmail.com>

Date: Sat, 21 Aug 2010 18:17:01 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Ken Hori <fplemma <at> gmail.com>, 6892 <at> debbugs.gnu.org
Subject: bug#6892: Please add a way to jump to advices
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





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

Previous Next


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