GNU Emacs
Emacs
Dashboard

14.21 Line Truncation

As an alternative to continuation (see Continuation Lines), Emacs can display long lines by truncation. This means that all the characters that do not fit in the width of the screen or window do not appear at all. On graphical displays, a small straight arrow in the fringe indicates truncation at either end of the line. On text terminals, this is indicated with ‘ $’ signs in the rightmost and/or leftmost columns.

Horizontal scrolling automatically causes line truncation (see Horizontal Scrolling). You can explicitly enable line truncation for a particular buffer with the command C-x x t ( toggle-truncate-lines). This works by locally changing the variable truncate-lines. If that variable is non- nil, long lines are truncated; if it is nil, they are continued onto multiple screen lines. Setting the variable truncate-lines in any way makes it local to the current buffer; until that time, the default value, which is normally nil, is in effect.

Since line truncation and word wrap (described in the next section) are contradictory, toggle-truncate-lines disables word wrap when it turns on line truncation.

If a split window becomes too narrow, Emacs may automatically enable line truncation. See Splitting Windows, for the variable truncate-partial-width-windows which controls this.