New value 'all-headlines for `org-provide-todo-statistics'.
When org-provide-todo-statistics is set to 'all-headlines, the statistics are performed against all headlines, including those with no TODO keyword. This was requested by David A. Gershman.
This commit is contained in:
parent
402448cb4c
commit
6ebb5f2304
|
@ -1,3 +1,11 @@
|
||||||
|
2009-07-26 Bastien Guerry <bzg@altern.org>
|
||||||
|
|
||||||
|
* org.el (org-provide-todo-statistics): Allow new value
|
||||||
|
'all-headlines for this option, which includes entries with no
|
||||||
|
TODO keywords in the todo statistics.
|
||||||
|
(org-update-parent-todo-statistics): Possibly use the new option
|
||||||
|
from `org-provide-todo-statistics'.
|
||||||
|
|
||||||
2009-07-25 Bastien Guerry <bzg@altern.org>
|
2009-07-25 Bastien Guerry <bzg@altern.org>
|
||||||
|
|
||||||
* org-clock.el (org-dblock-write:clocktable): Add a new option
|
* org-clock.el (org-dblock-write:clocktable): Add a new option
|
||||||
|
|
16
lisp/org.el
16
lisp/org.el
|
@ -1704,10 +1704,15 @@ by a letter in parenthesis, like TODO(t)."
|
||||||
|
|
||||||
(defcustom org-provide-todo-statistics t
|
(defcustom org-provide-todo-statistics t
|
||||||
"Non-nil means, update todo statistics after insert and toggle.
|
"Non-nil means, update todo statistics after insert and toggle.
|
||||||
When this is set, todo statistics is updated in the parent of the current
|
ALL-HEADLINES means update todo statistics by including headlines
|
||||||
entry each time a todo state is changed."
|
with no TODO keyword as well. When this is set, todo statistics
|
||||||
|
is updated in the parent of the current entry each time a todo
|
||||||
|
state is changed."
|
||||||
:group 'org-todo
|
:group 'org-todo
|
||||||
:type 'boolean)
|
:type '(choice
|
||||||
|
(const :tag "For TODO entries" t)
|
||||||
|
(const :tag "By all headlines" 'all-headlines)
|
||||||
|
(const :tag "No TODO statistics" nil)))
|
||||||
|
|
||||||
(defcustom org-hierarchical-todo-statistics t
|
(defcustom org-hierarchical-todo-statistics t
|
||||||
"Non-nil means, TODO statistics covers just direct children.
|
"Non-nil means, TODO statistics covers just direct children.
|
||||||
|
@ -9403,7 +9408,10 @@ statistics everywhere."
|
||||||
(> (setq l1 (length (match-string 1))) level))
|
(> (setq l1 (length (match-string 1))) level))
|
||||||
(setq kwd (and (or recursive (= l1 ltoggle))
|
(setq kwd (and (or recursive (= l1 ltoggle))
|
||||||
(match-string 2)))
|
(match-string 2)))
|
||||||
(and kwd (setq cnt-all (1+ cnt-all)))
|
(if (eq org-provide-todo-statistics 'all-headlines)
|
||||||
|
(setq cnt-all (1+ cnt-all))
|
||||||
|
(if org-provide-todo-statistics
|
||||||
|
(and kwd (setq cnt-all (1+ cnt-all)))))
|
||||||
(and (member kwd org-done-keywords)
|
(and (member kwd org-done-keywords)
|
||||||
(setq cnt-done (1+ cnt-done)))
|
(setq cnt-done (1+ cnt-done)))
|
||||||
(outline-next-heading)))
|
(outline-next-heading)))
|
||||||
|
|
Loading…
Reference in New Issue