diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a4ab263f0..152a215e4 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,8 @@ * org.el (org-refile): Refile to clock only if the prefix arg is 2. (org-sparse-tree): Fix docstring to be in line with prompt. + (org-update-parent-todo-statistics): Call + `org-after-todo-statistics-hook' on each level. 2009-11-04 Carsten Dominik diff --git a/lisp/org.el b/lisp/org.el index 194c53598..265acd135 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9973,7 +9973,7 @@ statistics everywhere." (while (and (setq level (org-up-heading-safe)) (or recursive first) (>= (point) lim)) - (setq first nil) + (setq first nil cookie-present nil) (unless (and level (not (string-match "\\" @@ -10008,10 +10008,10 @@ statistics everywhere." ndel (- (match-end 0) (match-beginning 0))) (goto-char (match-beginning 0)) (insert new) - (delete-region (point) (+ (point) ndel)))) - (when cookie-present - (run-hook-with-args 'org-after-todo-statistics-hook - cnt-done (- cnt-all cnt-done))))) + (delete-region (point) (+ (point) ndel))) + (when cookie-present + (run-hook-with-args 'org-after-todo-statistics-hook + cnt-done (- cnt-all cnt-done)))))) (run-hooks 'org-todo-statistics-hook))) (defvar org-after-todo-statistics-hook nil