Flushing empty lines in Emacs

from blog lmno.lol @alvaro, | ↗ original
Via masteringemacs.org, removing blank lines in a buffer: M-x flush-lines RET ^$ RET