Browse Source

org-effectiveness.el: Add org-effectiveness-count-task

    * contrib/lisp/org-effectiveness.el (org-effectiveness-count-task): Add function.
David Arroyo Menéndez 9 years ago
parent
commit
a20abaa725
1 changed files with 7 additions and 0 deletions
  1. 7 0
      contrib/lisp/org-effectiveness.el

+ 7 - 0
contrib/lisp/org-effectiveness.el

@@ -77,6 +77,13 @@ many TODO pending"
     (goto-char (point-min))
     (message "Number of Canceled: %d" (count-matches "* CANCEL+ED"))))
 
+(defun org-effectiveness-count-task()
+  "Print a message with the number of tasks and subtasks in the current buffer"
+  (interactive)
+  (save-excursion
+    (goto-char (point-min))
+    (message "Number of tasks: %d" (count-matches "^*"))))
+
 (defun org-effectiveness()
   "Returns the effectiveness in the current org buffer"
   (interactive)