Hello everyone! Org-mode is amazing. I've totally fallen in love with it. Glad to be joining the community.
I pasted the function into my .emacs file, but now I'm getting an error message when I launch: "Symbol's value as variable is void: org-checkbox-statistics-hook."
Any thoughts? Thanks in advance!
(add-to-list 'org-checkbox-statistics-hook (function ndk/checkbox-list-complete))
(defun ndk/checkbox-list-complete ()
(save-excursion
(org-back-to-heading t)
(let ((beg (point)) end)
(end-of-line)
(setq end (point))
(goto-char beg)
(if (re-search-forward "\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]" end t)
(if (match-end 1)
(if (equal (match-string 1) "100%")
;; all done - do the state change
(org-todo 'done)
(org-todo 'todo))
(if (and (> (match-end 2) (match-beginning 2))
(equal (match-string 2) (match-string 3)))
(org-todo 'done)
(org-todo 'todo))))))))
P.S. Not sure if it's relevant, but I'm on OSX using Aquamacs 2.4.