all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Ken Hori <fplemma@gmail.com>, 6892@debbugs.gnu.org
Subject: bug#6892: Please add a way to jump to advices
Date: Tue, 10 May 2022 04:01:35 +0200	[thread overview]
Message-ID: <875ymeno1s.fsf@gnus.org> (raw)
In-Reply-To: <jwvwneups9q.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 09 May 2022 12:50:22 -0400")

[-- Attachment #1: Type: text/plain, Size: 788 bytes --]

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> But it should work if you do
>
>     (advice-add 'bar :before #'bar--skip-line)
>     (defun bar--skip-line () (forward-line 1))

Ah, yes, and then we get a nice link, so that's fine.

>> 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`.

And it seems like define-advice already does everything right here.  With:

(defun bar ()
  (interactive)
  (forward-line 1))

(define-advice bar (:around (oldfun &rest args) test)
  (apply oldfun args))

load-history gets:

 ("/tmp/ad.el"
  (defun . bar)
  (defun . bar@test))


[-- Attachment #2: Type: image/png, Size: 29058 bytes --]

[-- Attachment #3: Type: text/plain, Size: 290 bytes --]


And everything is buttonified as requested in the bug report, so I guess
everything here has been fixed in the years since this was reported, and
I'm therefore closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

      reply	other threads:[~2022-05-10  2:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-21 18:17 bug#6892: Please add a way to jump to advices Ken Hori
2022-05-09 16:41 ` Lars Ingebrigtsen
2022-05-09 16:50   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-10  2:01     ` Lars Ingebrigtsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875ymeno1s.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=6892@debbugs.gnu.org \
    --cc=fplemma@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.