help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Refilling paragraphs to remove hard returns?


From: Marc Mientki
Subject: Re: Refilling paragraphs to remove hard returns?
Date: Wed, 05 May 2010 14:22:04 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

Am 05.05.2010 13:50, schrieb Jesse Sheidlower:
I imagine this is a common problem, so I don't know why I'm
having so much trouble finding an answer.

Suppose I have a text document that I've worked on in
text-mode. It is filled using the usual fill tools, so it
wraps at 72 characters, with a hard return after each line.
Paragraphs are separated by an extra hard return; there's no
other indentation.

I now need to give this document to someone who wants to work
on it in a word processor, who complains that there are hard
returns after every line. What's the easy way to remove these?

Some way may be unfill-region, that I found here at NG some years
ago:

(defun unfill-region (start end)
  "Make all START to END a single line."
  (interactive "*r")
  (save-excursion
    (goto-char end)
    (while
        (progn (goto-char (point-at-bol)) (< start (point)))
      (delete-indentation))))


But for long texts I use simply fill-paragraph or
fill-individual-paragraphs on whole text (buffer is in
text-mode, no longlines-mode is active). The result is
one lines per paragraph.

regards
Marc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]