CategoryFilling

Filling is the term used by Emacs to describe breaking lines before they get too long and run off the screen. It describes inserting carriage return characters, i.e. changing the text. It is related to LineWrap, which describes the more general process of displaying lines that are too long for the screen. Filling is sometimes used to avoid having to wrap lines.

The usual way to fill paragraphs are:

There are a few more minor modes that may be useful:

Usually, Emacs does not make a difference between “hard” and “soft” carriage returns. The end of each line is delineated with a newline character (\n) on Unix. (Old versions of Mac OS use a carriage return (\r), and DOS and Windows use both (\r\n, not \n\r). This EndOfLine convention can be adjusted in Emacs.) Because the newlines are part of the text, the lines may look odd (too long or too short) if you later view the file using another editor.

Conversely, you may encounter text files that do not contain newline characters, which means that Emacs treats each line as a super long line, making everything very hard to read. The solution for this is:

Highlighting or finding long lines without necessarily filling them:

(Any recommendations? Too much choice!)

Unwrapping:

See also: