Function: org-cycle-hide-archived-subtrees
org-cycle-hide-archived-subtrees is a byte-compiled function defined
in org-cycle.el.gz.
Signature
(org-cycle-hide-archived-subtrees STATE)
Documentation
Re-hide all archived subtrees after a visibility state change.
STATE should be one of the symbols listed in the docstring of
org-cycle-hook.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-cycle.el.gz
(defun org-cycle-hide-archived-subtrees (state)
"Re-hide all archived subtrees after a visibility state change.
STATE should be one of the symbols listed in the docstring of
`org-cycle-hook'."
(when (and (not org-cycle-open-archived-trees)
(not (memq state '(overview folded))))
(let ((globalp (memq state '(contents all))))
(if globalp
(org-fold-hide-archived-subtrees (point-min) (point-max))
(org-fold-hide-archived-subtrees
(point)
(save-excursion
(org-end-of-subtree t))))
(when (and (not globalp)
(member org-archive-tag
(org-get-tags nil 'local)))
(message "%s" (substitute-command-keys
"Subtree is archived and stays closed. Use \
`\\[org-cycle-force-archived]' to cycle it anyway."))))))