3 ms·
If emacs is so smart why is its macro recording that everyone loves totally invisible and thusly awkward to work with? People like multi-cursors because their
by KirinDave 9y ago
If emacs is so smart why is its macro recording that everyone loves totally invisible and thusly awkward to work with?
People like multi-cursors because their behavior is very stable and obvious. Macros have very unpredictable behavior except on lines that precisely conform to the shape of line you used to specify them.
And buffer narrowing/widening isn't a solution. You can specifically play the macro over cursor lines (it is a "good practice" to C-a at the start of a macro to help with this), but it's many more keystrokes.
It may be "all hat and no cattle" as the author says, but I have uses for hats and I've got no facilities to keep or slaughter cattle.
- joosters 9y agoControl-x ( starts recording a macro Control-x ) stops recording a macro Control-x e replays the macro They're no more obscure than the rest of emacs (which isn't a great starting point!) but everything comes down to keybindings in any text editor, you can map them to any key you want.
- omaranto 9y agoI prefer the more "modern" F3 and F4. They're not just shorter, they run slightly different commands that I find more useful.
- KirinDave 9y agoIt seems you've completely missed the point and in so doing have focused on the most trivial set of keybindings for macro usage. Why do you think this conversation is about keybindings? Who even mentioned them? Cool, you can start and record a macro. What does the temp macro do on this line? On a different line? Does your undo stack flip over or through the macro? How do you run the macro on lines with a specific suffix? Because macros inherently make a big blob of actions and turn them into a single action, they're inherently more obscure than multiple cursors. The funny part is of course that macros are dictated in emacs, not programmed. So what the multi-line cursor is doing is essentially showing you the results of a macro and letting you interactively work with it visually rather than deny you that option. Macros have uses, but Swift multi-line editing is by no means their strong suit.