manpagez: man pages & more
info emacs
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

30.12.2 Hard and Soft Newlines

In formatted text, Emacs distinguishes between two different kinds of newlines, hard newlines and soft newlines. (You can enable or disable this feature separately in any buffer with the command use-hard-newlines.)

Hard newlines are used to separate paragraphs, or items in a list, or anywhere that there should always be a line break regardless of the margins. The <RET> command (newline) and C-o (open-line) insert hard newlines.

Soft newlines are used to make text fit between the margins. All the fill commands, including Auto Fill, insert soft newlines—and they delete only soft newlines.

Although hard and soft newlines look the same, it is important to bear the difference in mind. Do not use <RET> to break lines in the middle of filled paragraphs, or else you will get hard newlines that are barriers to further filling. Instead, let Auto Fill mode break lines, so that if the text or the margins change, Emacs can refill the lines properly. See section Auto Fill Mode.

On the other hand, in tables and lists, where the lines should always remain as you type them, you can use <RET> to end lines. For these lines, you may also want to set the justification style to unfilled. See section Justification in Formatted Text.

© 2000-2017
Individual documents may contain additional copyright information.