15.15 Window Fringes

On graphical displays, each Emacs window normally has narrow fringes on the left and right edges. The fringes are used to display symbols that provide information about the text in the window. You can type M-x fringe-mode to toggle display of the fringes or to modify their width. This command affects fringes in all frames; to modify fringes on the selected frame only, use M-x set-fringe-style. You can make your changes to the fringes permanent by customizing the variable fringe-mode.

The most common use of the fringes is to indicate a continuation line (see Continuation Lines). When one line of text is split into multiple screen lines, the left fringe shows a curving arrow for each screen line except the first, indicating that this is not the real beginning. The right fringe shows a curving arrow for each screen line except the last, indicating that this is not the real end. If the line’s direction is right-to-left (see Bidirectional Editing), the meanings of the curving arrows in the fringes are swapped.

The fringes indicate line truncation (see Line Truncation) with short horizontal arrows meaning there’s more text on this line which is scrolled horizontally out of view. Clicking the mouse on one of the arrows scrolls the display horizontally in the direction of the arrow.

The fringes can also indicate other things, such as buffer boundaries (see Displaying Boundaries), unused lines near the end of the window (see indicate-empty-lines), and where a program you are debugging is executing (see Running Debuggers Under Emacs).

The fringe is also used for drawing the cursor, if the current line is exactly as wide as the window and point is at the end of the line. To disable this, change the variable overflow-newline-into-fringe to nil; this causes Emacs to continue or truncate lines that are exactly as wide as the window.

If you customize fringe-mode to remove the fringes on one or both sides of the window display, the features that display on the fringe are not available. Indicators of line continuation and truncation are an exception: when fringes are not available, Emacs uses the leftmost and rightmost character cells to indicate continuation and truncation with special ASCII characters, see Continuation Lines, and Line Truncation. This reduces the width available for displaying text on each line, because the character cells used for truncation and continuation indicators are reserved for that purpose. Since buffer text can include bidirectional text, and thus both left-to-right and right-to-left paragraphs (see Bidirectional Editing), removing only one of the fringes still reserves two character cells, one on each side of the window, for truncation and continuation indicators, because these indicators are displayed on opposite sides of the window in right-to-left paragraphs.