Function: org-cycle-content
org-cycle-content is an interactive and byte-compiled function defined
in org-cycle.el.gz.
Signature
(org-cycle-content &optional ARG)
Documentation
Show all headlines in the buffer, like a table of contents.
With numerical argument ARG, show content up to level ARG.
Key Bindings
Aliases
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-cycle.el.gz
(defun org-cycle-content (&optional arg)
"Show all headlines in the buffer, like a table of contents.
With numerical argument ARG, show content up to level ARG."
(interactive "p")
(org-fold-show-all '(headings))
(save-excursion
(goto-char (point-min))
;; Hide top-level drawer.
(save-restriction
(narrow-to-region (point-min) (or (re-search-forward org-outline-regexp-bol nil t) (point-max)))
(org-fold-hide-drawer-all))
(goto-char (point-max))
(let ((regexp (if (and (wholenump arg) (> arg 0))
(format "^\\*\\{1,%d\\} " arg)
"^\\*+ "))
(last (point)))
(while (re-search-backward regexp nil t)
(org-fold-region (line-end-position) last t 'outline)
(setq last (line-end-position 0))))))