Nick Dokos <nicholas.do...@hp.com> writes: > > #+begin_src emacs-lisp > (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) > ;; check for the cookie: [100%] or [N/N] > (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)) > (if (and (> (match-end 2) (match-beginning 2)) > (equal (match-string 2) (match-string 3))) > ;; all done - do the state change > (org-todo 'done)))))))) > #+end_src > > Nick
Thanks, works like charm. Klaus