Function: org-fold-heading
org-fold-heading is a byte-compiled function defined in
org-fold.el.gz.
Signature
(org-fold-heading FLAG &optional ENTRY)
Documentation
Fold/unfold the current heading. FLAG non-nil means make invisible.
When ENTRY is non-nil, show the entire entry.
Aliases
org-flag-heading (obsolete since 9.6)
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-fold.el.gz
;;;;; Heading visibility
(defun org-fold-heading (flag &optional entry)
"Fold/unfold the current heading. FLAG non-nil means make invisible.
When ENTRY is non-nil, show the entire entry."
(save-excursion
(org-back-to-heading t)
;; Check if we should show the entire entry
(if (not entry)
(org-fold-region
(line-end-position 0) (line-end-position) flag 'outline)
(org-fold-show-entry)
(save-excursion
;; FIXME: potentially catches inlinetasks
(and (outline-next-heading)
(org-fold-heading nil))))))