Macro Workshop

Howard Abrams has an excellent tutorial on Emacs keyboard macros. It’s structured much like the builtin Emacs tutorial in that you download the tutorial into an Emacs buffer and then do the exercises in situ. Unlike the Emacs tutorial, it’s reasonably short and you should be able to work through it in about 30 minutes or less.

The tutorial starts off with the usual macro stuff that we all know but then moves on the some things I hadn’t seen before. For example, he shows you how to bring up the Emacs Macro ring and choose one the macros defined in the current session. Another nice trick is how to suspend a macro invocation so that you can do some editing unique to that invocation and then continue with the macro. There’re a lot a good things in the tutorial and everyone should take a look at it. If you aren’t already using keyboard macros, you’re doing more work than you need to.

Since most of us don’t use macros enough to internalize the key bindings, it makes sense to either add 【Ctrl+x Ctrl+k】 to your key-guide, if you have it installed, or to make a hydra with the commands.

As much as I like this tutorial, Abrams does get one thing very wrong. The worst song ever perpetrated on mankind is NOT The Twelve Days of Christmas. That would be Little Drummer Boy.

This entry was posted in General and tagged . Bookmark the permalink.