all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Okamsn <okamsn@protonmail.com>
To: Eduardo Ochs <eduardoochs@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to get keyboard macro that was just run?
Date: Sun, 18 Jun 2023 17:13:29 +0000	[thread overview]
Message-ID: <b84a1bf5-b822-d101-ec02-533ea19893f2@protonmail.com> (raw)
In-Reply-To: <6c170d4b-c93a-d19d-7b7f-1b719373ed9d@protonmail.com>

On 2023-06-18 17:05 UTC, Okamsn wrote:
> On 2023-06-18 15:53 UTC, Eduardo Ochs wrote:
>> 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
> 
> Thank you for the response. I know that the variable `last-kbd-macro`
> contains the last keyboard macro that was defined, but I am interested
> in programmatically knowing the last keyboard macro that was run, just
> after it is run.
> 
> For example, `consult-kmacro` selects a keyboard macro from
> `kmacro-ring`, converts that macro to a function, and then runs
> function. In this way, it does not change the value of `last-kbd-macro`,
> as far as I'm aware.
> 
> 

I realize now that the problem is more complicated than I first thought, 
because Meow also uses keyboard macros in other ways, so just advising 
`execute-kbd-macro` would affect things indiscriminately.




      parent reply	other threads:[~2023-06-18 17:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-18 14:28 How to get keyboard macro that was just run? Okamsn
2023-06-18 15:53 ` Eduardo Ochs
2023-06-18 17:05   ` Okamsn
2023-06-18 17:13     ` [External] : " Drew Adams
2023-06-18 17:50       ` Okamsn
2023-07-01 21:07         ` Okamsn
2023-06-18 17:13     ` Okamsn [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

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

  git send-email \
    --in-reply-to=b84a1bf5-b822-d101-ec02-533ea19893f2@protonmail.com \
    --to=okamsn@protonmail.com \
    --cc=eduardoochs@gmail.com \
    --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.