[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

38.3 Truncation

When a line of text extends beyond the right edge of a window, the line can either be continued on the next screen line, or truncated to one screen line. The additional screen lines used to display a long text line are called continuation lines. Normally, a `$' in the rightmost column of the window indicates truncation; a `\' on the rightmost column indicates a line that "wraps" onto the next line, which is also called continuing the line. (The display table can specify alternative indicators; see 38.17 Display Tables.)

Note that continuation is different from filling; continuation happens on the screen only, not in the buffer contents, and it breaks a line precisely at the right margin, not at a word boundary. See section 32.11 Filling.

User Option: truncate-lines
This buffer-local variable controls how Emacs displays lines that extend beyond the right edge of the window. The default is nil, which specifies continuation. If the value is non-nil, then these lines are truncated.

If the variable truncate-partial-width-windows is non-nil, then truncation is always used for side-by-side windows (within one frame) regardless of the value of truncate-lines.

User Option: default-truncate-lines
This variable is the default value for truncate-lines, for buffers that do not have buffer-local values for it.

User Option: truncate-partial-width-windows
This variable controls display of lines that extend beyond the right edge of the window, in side-by-side windows (see section 28.2 Splitting Windows). If it is non-nil, these lines are truncated; otherwise, truncate-lines says what to do with them.

When horizontal scrolling (see section 28.13 Horizontal Scrolling) is in use in a window, that forces truncation.

You can override the glyphs that indicate continuation or truncation using the display table; see 38.17 Display Tables.

If your buffer contains very long lines, and you use continuation to display them, just thinking about them can make Emacs redisplay slow. The column computation and indentation functions also become slow. Then you might find it advisable to set cache-long-line-scans to t.

Variable: cache-long-line-scans
If this variable is non-nil, various indentation and motion functions, and Emacs redisplay, cache the results of scanning the buffer, and consult the cache to avoid rescanning regions of the buffer unless they are modified.

Turning on the cache slows down processing of short lines somewhat.

This variable is automatically buffer-local in every buffer.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on May 2, 2002 using texi2html