Add a new hack: Mark subtree DONE along with all subheadings
commit771c5500eb712b09c6c6cdfaeee23907a6bc03a1
authorBastien Guerry <bzg@altern.org>
Fri, 22 Jul 2011 13:51:36 +0000 (22 15:51 +0200)
committerBastien Guerry <bzg@altern.org>
Fri, 22 Jul 2011 13:51:36 +0000 (22 15:51 +0200)
tree7b982c627788eb24c773c7d5819f04928aec2413
parent3b238c78829b2e3ebc6c72f45a405767f697f967
Add a new hack: Mark subtree DONE along with all subheadings

Bernt Hansen [[http://permalink.gmane.org/gmane.emacs.orgmode/44693][suggested]] this command:

#+begin_src emacs-lisp
(defun bh/mark-subtree-done ()
  (interactive)
  (org-mark-subtree)
  (let ((limit (point)))
    (save-excursion
      (exchange-point-and-mark)
      (while (> (point) limit)
(org-todo "DONE")
(outline-previous-visible-heading 1))
      (org-todo "DONE"))))
#+end_src

Then M-x bh/mark-subtree-done.

See http://permalink.gmane.org/gmane.emacs.orgmode/44693 for a discussion
of this need.
org-hacks.org