Tuesday, October 2, 2007

unwrap lines in emacs (reverse M-q)

Apply to M-q (fill-paragraph) paragraphs before copy-pasting from Emacs to a web form that automatically wraps paragraphs. Taken from http://xahlee.org/emacs/modern_operations.el

; This file is licensed under the GNU General Public License.

; Author: Xah Lee
; Date: 2007-08-01
; ∑ http://xahlee.org/

(defun remove-hard-wrap-paragraph ()
"Replace line endings into single spaces on the current paragraph."
(interactive)
(let ((fill-column 90002000))
(fill-paragraph nil)))

No comments: