Tim Visher, who used to publish the much-missed VimGolf in Emacs videos, just tweeted a useful tip:
OMG I have been looking for #emacs `org-list-repair` _forever!_ https://t.co/QMeulfO4KD (sorry if the link breaks, I can’t figure out to get a stable link to a line like in github).
— Tim Visher (@timvisher) June 19, 2019
I played around with it a bit but couldn’t get it to fix the thing that most often troubles me: badly indented continuation lines in a list. It did fix some other indentation errors though. If you often have problems with list indentation, try it out to see if it helps.
It’s not bound to anything by default so you have to call it by name unless you think you’ll use it enough to make your own binding. I’m going to call it every time I have a malformed list until I get a feel for exactly what it does. I did look at the code but that merely calls org-list-write-struct
, which, in turn, calls a bunch of lower level functions that I didn’t have the energy to trace through.