all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Jean Louis <bugs@gnu.support>, help-gnu-emacs@gnu.org
Subject: RE: Is there way to read function invoked and its parameters?
Date: Mon, 28 Dec 2020 08:40:30 -0800 (PST)	[thread overview]
Message-ID: <3fb924a1-794e-43f7-bdea-d95a383c448a@default> (raw)
In-Reply-To: <X+mB2oSi9mcPXrSK@protected.rcdrun.com>

> > > Reading quickly, so perhaps not understanding the request.
> > > But I'm guessing that advice is what you're looking for.

Still not reading this thread carefully, but I
still have the impression that, for what you want
to do, you can use _advice_.

https://www.gnu.org/software/emacs/manual/html_node/elisp/Advising-Functions.html

When a function gets called you can do anything,
including introspect the current context,
reporting on it, and reinvoking the called arg
(with the same or different args).  Pretty much
anything.

The only limitation of this approach is that,
like `debug-on-entry', it only takes control
when the function is actually invoked.  Other
than that consideration, you can do pretty
much anything, with the full call context at
hand.



  reply	other threads:[~2020-12-28 16:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<courier.000000005FE8CA54.00006BFB@stw1.rcdrun.com>
2020-12-27 18:20 ` Is there way to read function invoked and its parameters? Drew Adams
2020-12-27 18:39   ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-28  6:57     ` Jean Louis
2020-12-28 16:40       ` Drew Adams [this message]
2020-12-28 19:58         ` Jean Louis
2020-12-27 17:54 Jean Louis
2020-12-27 18:04 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-27 19:11 ` Yuri Khan
2020-12-28  7:07   ` Jean Louis
2020-12-28  9:04     ` Yuri Khan

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=3fb924a1-794e-43f7-bdea-d95a383c448a@default \
    --to=drew.adams@oracle.com \
    --cc=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    /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.