Oleh Krehel (abo-abo) gave a very nice talk on
hydras at the london.el Emacs Meetup. The talk was on 2017-07-04 so the information is up to date. Happily, abo-abo recorded the talk so you can watch it on YouTube.
Krehel starts the talk by giving the history of the hydra package. Originally, it was just a simple macro that he used mainly to make zooming in and out easy. Sacha liked it and encouraged him to package it for Melpa. Today, of course, it’s much more full-featured. Actually, I wasn’t aware of the newest features. Mostly they make building hydras easier and also give better control over what gets displayed.
One nice use of hydras is for increasing the number of bindings available to use. You can pick a prefix (to call the hydra) and then have any number of other keys mapped to some action. You can do that by hand, of course, but using the hydra makes it easy and the
:timeout keyword makes it behave just like a regular keymap with
Another nice example is getting all of the rectangle commands in a single place. By default, the rectangle keys are intermixed with the register and bookmark bindings and it’s hard to find exactly what you want. With a hydra, you see just the rectangle binding and, if you, unlike me, ever learn them, you can simply set a timeout so the hydra doesn’t display anything unless you forget.
The video is 37 minutes so you’ll have to schedule some time but it’s definitely worth watching, especially if you haven’t kept up with all the latest hydra features.