[Org] Simplify resetting of checkboxes

Now there is no need to depend on ‘org-plus-contrib’ anymore :D
This commit is contained in:
Daniel - 2017-08-12 11:25:04 +02:00
parent 10e7a079d1
commit f3c05d630d
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 11 additions and 2 deletions

View File

@ -735,9 +735,18 @@ _y_: ?y? year _q_: quit _L__l__c_: ?l?
org-src-preserve-indentation t)
;;; Other Packages
;;; Reset checklists
(require 'org-checklist)
;; from `org-checklist by James TD Smith (@ ahktenzero (. mohorovi cc)),
;; version: 1.0
(defun org-reset-checkbox-state-maybe ()
"Reset all checkboxes in an entry if the `RESET_CHECK_BOXES' property is set"
(interactive "*")
(if (org-entry-get (point) "RESET_CHECK_BOXES")
(org-reset-checkbox-state-subtree)))
(add-hook 'org-after-todo-state-change-hook 'org-reset-checkbox-state-maybe)
;;; Calendar