How to undo fill-paragraph in emacs?
emacs, word-wrap
Solution
You can set `fill-columnn` to a really large number, and fill.
C-u 10000 C-x f M-x fill-individual-paragraphs
Or you can use a little custom function:
(defun refill-paragraphs-to-be-one-line ()
"fill individual paragraphs with large fill column"
(interactive)
(let ((fill-column 100000))
(fill-individual-paragraphs (point-min) (point-max))))
Problem
I have a text file that is pretty long. Any easy way to "undo" a `M-q` (fill-paragraph) on a file that was written and saved a while ago? For example, I want to change this: They're coming to take me away, ha-haaa!! They're coming to take me away, ho-ho, hee-hee, ha-haaa To the funny farm. Where life is beautiful all the time and I'll be happy to see those nice young men in their clean white coats and they're coming to take me away, ha-haaa!!!!! To this: They're coming to take me away, ha-haaa!! They're coming to take me away, ho-ho, hee-hee, ha-haaa To the funny farm. Where life is beautiful all the time and I'll be happy to see those nice young men in their clean white coats and they're coming to take me away, ha-haaa!!!!!