(defun my-unfill-paragraph (&optional region)
"Make multi-line paragraph into a single line of text.
REGION unfills the region. See URL
(interactive (progn (barf-if-buffer-read-only) '(t)))
(let ((fill-column (point-max))
;; This would override `fill-column' if it's an integer.
(fill-paragraph nil region)))
It works by setting the upper limit on the fill-column variable to the maximum point in the buffer. The fill-column variable controls the column beyond which automatic line-wrapping should happen. It also sets emacs-lisp-docstring-fill-column to t which means that the fill column for lisp docstrings should use the same fill value as that given by fill-column. In essence, this removes line-wrapping. Finally, it calls the fill command for the region or current paragraph.
I can't think of a quick built-in solution that works in all cases. For a single paragraph, you can:
Mark the paragraph (mark-paragraph, M-h).
Remove the beginning and ending line break from the region (right C-x C-x left).
Replace line breaks by spaces (C-M-% C-q C-j RET SPC RET !).
This is unwieldy enough that setting fill-column to a very high value and running fill-region tends to be more convenient. Doing it for multiple paragraphs is even more unwieldy because there isn't a regular expression that matches line breaks that aren't paragraph breaks.
If you don't want to modify fill-column, you can:
Create an indirect buffer: C-x 4 c
Set fill-column in the indirect buffer: M-x set-variable RET fill-column RET 99999999 RET