Here’s an Emacs feature that I—and, apparently, many others—didn’t know about:
Uh this emacs region undo thing is kinda blowing my mind. I had no idea! pic.twitter.com/WWYbZtNIM4
— John Wiseman (@lemonodor) January 24, 2020
That’s a fantastic time and effort saver when you want to undo a change that’s not at the tip of your undo tree.
Sadly, as far as I can tell, it doesn’t work with undo-tree, a package that I’m not willing to give up. For those of you not using undo-tree, you should try this out. It’s built into the Emacs undo system so there’s nothing to install.
According to the Emacs Manual, if you aren’t in Transient Mark mode you will need a prefix argument to undo. If, like most people these days, you are using Transient Mark mode, you won’t need the prefix argument.
Update Hjmr reports that it will work with undo-tree
if you set undo-tree-enable-undo-in-region
to t
. I’ve verified that this works so we can have the best of both worlds: undo-tree
and selective undo.