1

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?

2
  • Are you perhaps referring to narrow and widen?
    – Dan
    Sep 3, 2017 at 11:43
  • Yes! Thank you so much for telling me this.
    – dragon
    Sep 3, 2017 at 11:45

1 Answer 1

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.