unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Campbell Barton <ideasman42@gmail.com>, emacs-devel@gnu.org
Subject: Re: Interest in temporary with-advice functionality?
Date: Thu, 20 Jun 2024 19:08:27 -0700	[thread overview]
Message-ID: <18b80475-e3b4-2a88-1ee4-26a88fc56143@gmail.com> (raw)
In-Reply-To: <cd22ca42-19aa-4ba9-99fb-f6bd471147c4@gmail.com>

On 6/17/2024 9:12 PM, Campbell Barton wrote:
> While `cl-letf` can be used, advice is especially useful for it's 
> :around functionality, while possible, it gets fairly verbose to use 
> cl-letf to override the function in a way that supports calling the 
> original.
> 
> I've been using a "with-advice" macro (see [0]).
> 
> The macros temporarily adds, then removed the advice
[snip]
> I was wondering if there is any interest to have this added to emacs.

I've done this sort of temporary-advising more than a handful of times 
(mostly in my init.el to work around various bugs on older Emacs 
versions), and would find it useful.



  reply	other threads:[~2024-06-21  2:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18  4:12 Interest in temporary with-advice functionality? Campbell Barton
2024-06-21  2:08 ` Jim Porter [this message]
2024-06-21 18:51   ` Michael Heerdegen via Emacs development discussions.

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=18b80475-e3b4-2a88-1ee4-26a88fc56143@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=ideasman42@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).