There seems to be a command to display only the text in the selected region, leaving the rest of the text hidden. What is the command?
1 Answer
As @Dan commented, you are referring to "narrowing" the buffer. For details read the Narrowing section in the Emacs Manual.
The command narrow-to-region
(bound to C-x n n
by default) will do what you want. Use widen
(C-x n w
) to remove the restriction and see the whole buffer again.
In some modes there may be other ways to narrow things. For example, use narrow-to-defun
to focus on the current function in many programming modes; and in org mode you can use org-narrow-to-subtree
.