Function: org-inlinetask-hide-tasks

org-inlinetask-hide-tasks is a byte-compiled function defined in org-inlinetask.el.gz.

Signature

(org-inlinetask-hide-tasks STATE)

Documentation

Hide inline tasks in buffer when STATE is contents or children.

This function is meant to be used in org-cycle-hook.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-inlinetask.el.gz
(defun org-inlinetask-hide-tasks (state)
  "Hide inline tasks in buffer when STATE is `contents' or `children'.
This function is meant to be used in `org-cycle-hook'."
  (pcase state
    (`contents
     (let ((regexp (org-inlinetask-outline-regexp)))
       (save-excursion
	 (goto-char (point-min))
	 (while (re-search-forward regexp nil t)
	   (org-inlinetask-toggle-visibility 'fold)
	   (org-inlinetask-goto-end)))))
    (`children
     (save-excursion
       (while
	   (or (org-inlinetask-at-task-p)
	       (and (outline-next-heading) (org-inlinetask-at-task-p)))
	 (org-inlinetask-toggle-visibility 'fold)
	 (org-inlinetask-goto-end))))))