unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Steven Allen <steven@stebalien.com>
Cc: 68114@debbugs.gnu.org
Subject: bug#68114: [PATCH] Make 'advice-remove' interactive
Date: Sat, 06 Jan 2024 18:48:20 +0200	[thread overview]
Message-ID: <83o7dys90r.fsf@gnu.org> (raw)
In-Reply-To: <87r0j3hcir.fsf@stebalien.com> (message from Steven Allen on Sat,  30 Dec 2023 08:37:48 -0800)

> From: Steven Allen <steven@stebalien.com>
> Date: Sat, 30 Dec 2023 08:37:48 -0800
> 
> Ah, I responded to the previous message before seeing this one.

I installed this patch, thanks.

> > Btw, what is "the 'name' of a piece of advice"?  I realize that this
> > text was there to begin with, but I don't think I understand what it
> > wants to tell me, so maybe we could clarify that.  The only reference
> > to a "name" in the preceding text uses "name" to mean a symbol, but
> > then what is "the name of a piece of advice"?  I guess this goes back
> > to define-advice, which says:
> >
> >   @defmac define-advice symbol (where lambda-list &optional name depth) &rest body
> >   This macro defines a piece of advice and adds it to the function named
> >   @var{symbol}.  The advice is an anonymous function if @var{name} is
> >   @code{nil} or a function named @code{symbol@@name}.  See
> >   @code{advice-add} for explanation of other arguments.
> >
> > which is also a bit mysterious.  Does NAME used here serve as "the
> > name of the piece of advice"? if so, should "@code{symbol@@name}" be
> > "@code{symbol@@@var{name}}" instead, i.e. "name" is not a literal
> > string but the reference to NAME?
> 
> So, those two names are actually different. The 'name' in referenced in
> the `advice-remove` documentation is the 'name in the advice's 'props'
> alist. The 'name' specified in `define-advice` is _not_ added to this
> alist and is only used in the advice's function name.
> 
> I'm happy to resolve this in a separate patch, if that's OK with you.
> Something like (`define-advice` documentation):
> 
>     Note if NAME is nil the advice is anonymous; otherwise the advice
>     function is named `SYMBOL@NAME' and the advice is named NAME.
> 
> Then actually add NAME to the properties.

Yes, I think something like this should be installed.





      parent reply	other threads:[~2024-01-06 16:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-29 19:57 bug#68114: [PATCH] Make 'advice-remove' interactive Steven Allen
2023-12-29 20:12 ` Eli Zaretskii
2023-12-29 20:47   ` Steven Allen
2023-12-29 21:20     ` Stefan Kangas
2023-12-29 22:43       ` Steven Allen
2023-12-30  5:06     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-30 16:22       ` Steven Allen
2023-12-30  6:45     ` Eli Zaretskii
2023-12-30 16:37       ` Steven Allen
2024-01-06  9:02         ` Eli Zaretskii
2024-01-06 16:48         ` Eli Zaretskii [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

  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=83o7dys90r.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=68114@debbugs.gnu.org \
    --cc=steven@stebalien.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).