Search code examples
emacsorg-mode

Emacs, How can I display only current task and hide others in org-mode?


Org-mode.
I have a big tasks tree and I want to select only 1 in buffer (write notes just for it) and hide others while editing.
How can I do this?

task-1
  subtask-1.1
  subtask-1.2
task-2
  subtask2.1
...
...

For example I want to display for me only:

subtask-1.2
(notes for this subtask)

Solution

  • Use narrow-to-defun or org-narrow-to-subtree command with point in task. (widen to move back to whole buffer content).

    Default shortcuts:

    C-x n s      # org-narrow-to-subtree (bound in org-mode)
    C-x n d      # narrow-to-defun
    C-x n w      # widen
    

    Manual