summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Arroyo Menendez <davidam9@riseup.net>2014-03-15 09:11:54 +0100
committerDavid Arroyo Menendez <davidam9@riseup.net>2014-03-15 09:11:54 +0100
commiteb9c5ae49ad084b1a747aaa41f12457e06d771c9 (patch)
treebbef84196ac312ef59268ff17eb08ab3d4c7f62c
parente1ede2271c11930fc5484274c9373a97466ae019 (diff)
downloadorg-mode-eb9c5ae49ad084b1a747aaa41f12457e06d771c9.tar.gz
add org-effectiveness-advice feature
-rw-r--r--contrib/lisp/org-effectiveness.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/lisp/org-effectiveness.el b/contrib/lisp/org-effectiveness.el
index a872cb2..4206a27 100644
--- a/contrib/lisp/org-effectiveness.el
+++ b/contrib/lisp/org-effectiveness.el
@@ -33,6 +33,22 @@
(require 'org)
+(defcustom org-effectiveness-max-todo 50
+ "This variable is useful to advice to the user about
+many TODO pending"
+ :type 'integer
+ :group 'org-effectiveness)
+
+(defun org-effectiveness-advice()
+ "Advicing about a possible excess of TODOS"
+ (interactive)
+ (goto-char (point-min))
+ (if (< org-effectiveness-max-todo (count-matches "* TODO"))
+ (message "An excess of TODOS!")))
+
+;; Check advice starting an org file
+(add-hook 'org-mode-hook 'org-effectiveness-advice)
+
(defun org-effectiveness-count-keyword(keyword)
"Print a message with the number of keyword outline in the current buffer"
(interactive "sKeyword: ")