Go to the first, previous, next, last section, table of contents.

Selective Display

Emacs has the ability to hide lines indented more than a certain number of columns (you specify how many columns). You can use this to get an overview of a part of a program.

To hide lines, type C-x $ (set-selective-display) with a numeric argument n. Then lines with at least n columns of indentation disappear from the screen. The only indication of their presence is that three dots (`...') appear at the end of each visible line that is followed by one or more invisible ones.

The commands C-n and C-p move across the invisible lines as if they were not there.

The invisible lines are still present in the buffer, and most editing commands see them as usual, so you may find point in the middle of invisible text. When this happens, the cursor appears at the end of the previous line, after the three dots. If point is at the end of the visible line, before the newline that ends it, the cursor appears before the three dots.

To make all lines visible again, type C-x $ with no argument.

If you set the variable selective-display-ellipses to nil, the three dots do not appear at the end of a line that precedes invisible lines. Then there is no visible indication of the invisible lines. This variable becomes local automatically when set.


Go to the first, previous, next, last section, table of contents.