Questions tagged [keyboard-macros]
A "keyboard macro" is a command defined by an Emacs user which represents a sequence of keys. Calling a keyboard macro is equivalent to typing that key sequence.
121 questions
1 vote
2 answers
51 views
Search-and-replace in a macro failing stops macro
I've got an issue where about 16 nuget packages were renamed, so I'm faced with going through about 50 project.json files in 50 different directories and fixing the names of any of these 16 nuget ...
1 vote
1 answer
360 views
How do I load a previously named keyboard macro?
If I've previously defined a keyboard macro via C-x ( and C-x (i.e. kmacro-{start,end}-macro), named it via C-x C-k n (kmacro-name-last-macro), and then recorded a bunch of other macros in the same ...
2 votes
1 answer
76 views
'Hey Keyboard Macro, talk to me!' — 'Okay.'
Keyboard Macros - recording a sequence of keystrokes - start by 'C-x (' and end by 'C-x )' - to be replayed - for example by 'C-x e' - is such a useful tool. It's like the perfect stepping stone ...
0 votes
2 answers
89 views
How to insert kbd macros in Yas-snippets?
I'm trying to learn how to: Define a kbd-macro, (here I'm using kbd-macros, because I'm bad at elisp currently). Letting that to be executed when yas-snippet to expand. (here I'm struggling with) My ...
3 votes
1 answer
102 views
Documenting keyboard macros Can I have a doc string for fset the same way as defun
I often create and save elaborate keyboard macros that I wish to use later, and hope to be prompted for the proper context to use them. I note that if I manually write a function to use as a command ...
1 vote
1 answer
124 views
Elisp function to transform word at point
How to write an elisp function that transforms the word at point? Specifically, in the C++ code I am refactoring I have to replace tons of raw pointers into smart pointers. Say, for class Foo, I would ...
1 vote
4 answers
192 views
how to define keyboard macro from text
I am using shell inside Emacs. Often I need to execute a series of shell commands around ~40 chars, as of now I copy all the commands together and paste it from documentation. Is there any way to ...
2 votes
2 answers
488 views
Emacs 28: How to use `RET` without exiting a recursive edit within a keyboard macro?
Now that I switched to using GNU Emacs 28.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95)) of 2022-05-11 I can no longer end my use of my keyboard macro that ...