Re: Advicing the `interactive' form of a command
Stéphane Marks <[email protected]>
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <CAN+1HbqWoB3h4-_C0UwOgWaKxJ4ag0yxpAQtj6=3nVuaYMDeug@mail.gmail.com> |
On Sun, May 3, 2026 at 11:02 PM Roland Winkler <[email protected]> wrote: > On Sun, May 03 2026, Stéphane Marks wrote: > > If you put a print statement in your advice, you'll see > > it does work for sure. > > For me, the print statement happens to late: from what I can tell, > the advice goes around the body of the adviced function. So I can > print, in particular, the args passed to the body. > > > But I sense that maybe you want to advise 'read-buffer-to-switch > > instead. Give that a try and see if that does what you're looking > > for. > > Thanks, this is indeed a clean solution for my particular problem > that works as expected. However, this will not work for other commands > if the command uses a more sophisticated interactive spec without > delegating this work to a separate noninteractive function like > `read-buffer-to-switch'. > I'm sure with some experimentation you'll arrive at what you're looking for.