vfclists · 2022-07-22 08:38
When I'm creating macros (about two or three so far) it is hard to tell what exact keys are being recorded and their command equivalents depending on the mode.
Is there some tool that can display a window showing what keys I'm pressing and their command equivalents depending on the mode?
Something else I've forgotten - is there some indicator that shows when you are recording a macro and when you finish?
Can macro execution be made mode dependent?
unixbhaskar · 2022-07-22 08:58
Not exactly what you are looking for , but you might turn on "command-log-mode" ...that will tell you what you are pressing.
M-x command-log-mode
franburstall · 2022-07-22 09:07
Try `view-lossage` on `C-h l`.
rswgnu · 2022-07-22 12:41
You can also install the Hyperbole package and simply type out your macros within {braces} and then execute them by pressing M-RET within the braces.
You can also create global named macro buttons that can be activated by name from anywhere.
If you want the more complicated, less flexible way of naming and saving macros that is included in Emacs without loading a package, see this good writeup:
https://www.masteringemacs.org/article/keyboard-macros-are-misunderstood
[deleted] · 2022-07-22 13:17
You can see what you have done after recording a macro with commands: `edit-kbd-macro` , `edit-last-kbd-macro` and `edit-named-kbd-macro`
It opens a buffer with a macro editor that shows each command, incl. self-inserting keys, like this for example:
;; Keyboard Macro Editor. Press C-c C-c to finish; press C-x k RET to cancel.
;; Original keys: h e 2\*l o C-a M-c M-u C-e RET
Command: last-kbd-macro Key: none
Macro:
h ;; self-insert-command
e ;; self-insert-command
2\*l ;; self-insert-command
o ;; self-insert-command
C-a ;; sacha/smarter-move-beginning-of-line
M-c ;; capitalize-dwim
C-e ;; move-end-of-line
RET ;; org-return
AuroraDraco · 2022-07-24 22:50
Shit, I had no clue there was a way to edit macros. Well, you learn something new every day with Emacs