0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 05:46:27 +00:00

New function org-reset-checkbox-state which always clears the checkboxes

Copying subtrees with checked off lists to create a new task would
normally require the boxes to be unchecked.  This function lets
you easily clear all checkboxes in an entry without requiring
the RESET_CHECK_BOXES property.
This commit is contained in:
Bernt Hansen 2009-04-24 08:49:52 -04:00
parent d072797344
commit 710eec9d57

View file

@ -52,6 +52,11 @@
"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)))
(defun org-reset-checkbox-state ()
"Reset all checkboxes in an entry"
(interactive "*")
(save-restriction
(save-excursion
(org-narrow-to-subtree)
@ -62,7 +67,7 @@
(when (org-at-item-checkbox-p)
(replace-match "[ ]" t t))
(beginning-of-line 2))))
(org-update-checkbox-count-maybe))))
(org-update-checkbox-count-maybe)))
(defun org-make-checklist-export ()
"Produce a checklist containing all unchecked items from a list