help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get keyboard macro that was just run?


From: Eduardo Ochs
Subject: Re: How to get keyboard macro that was just run?
Date: Sun, 18 Jun 2023 12:53:59 -0300

Hi Okamsn,
try to run this with C-x C-e:

(insert (format "\n\%S\n"
  `(setq last-kbd-macro (kbd ,(format-kbd-macro last-kbd-macro)))))

it's roughly the trick that I use to save and edit keyboard macros,
but stripped out of all the cruft...
  Cheers,
    Eduardo Ochs
    http://anggtwu.net/#eev

On Sun, 18 Jun 2023 at 11:30, Okamsn <okamsn@protonmail.com> wrote:
>
> Hello,
>
> The package Meow has commands to play back a keyboard macro at multiple
> locations, but these commands are limited to running the last defined
> keyboard macro.
>
> I am wondering whether there is a way that it could play back the
> keyboard macro that was just run for the other locations by hooking into
> or advising some feature.  My hope is that it would then be able to work
> automatically with commands like `consult-kmacro`, which allows one to
> run a keyboard macro by selecting it using completion, without first
> having to rotate the `kmacro-ring`.
>
> I have tried checking the value of `executing-kbd-macro` in
> `kbd-macro-termination-hook`, but the value was nil.
>
> Does Emacs make this information available?
>
> Thank you.
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]