Function: org-archive-all-done

org-archive-all-done is a byte-compiled function defined in org-archive.el.gz.

Signature

(org-archive-all-done &optional TAG)

Documentation

Archive sublevels of the current tree without open TODO items.

If the cursor is not on a headline, try all level 1 trees. If it is on a headline, try all direct children. When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-archive.el.gz
(defun org-archive-all-done (&optional tag)
  "Archive sublevels of the current tree without open TODO items.
If the cursor is not on a headline, try all level 1 trees.  If
it is on a headline, try all direct children.
When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag."
  (org-archive-all-matches
   (lambda (_beg end)
     (let ((case-fold-search nil))
       (unless (re-search-forward org-not-done-heading-regexp end t)
	 "no open TODO items")))
   tag))