forked from mirrors/org-mode
Let blocking be turned-off on a per-file basis using local variables
Wes Hardaker writes: > Attached is a patch that lets local variables define whether or not todo > dependency blocking should be used (both for TODOs and for checkboxes). > I have one file in particular that I'm using checkboxes to quickly > indicate multi-selections from a list but for most of my files I want > TODOs blocked by uncompleted checkboxes. > > Normally org uses hook methods for checking for TODO blocks and this > patch just inserts a check at the top to test and see if the variable > turning on the blocking type is still set.
This commit is contained in:
parent
b66858acbb
commit
16f73aff96
|
@ -1,5 +1,9 @@
|
||||||
2010-02-01 Carsten Dominik <carsten.dominik@gmail.com>
|
2010-02-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org.el (org-block-todo-from-children-or-siblings-or-parent)
|
||||||
|
(org-block-todo-from-checkboxes): Respect the local variable
|
||||||
|
value when deciding if blocking should be active.
|
||||||
|
|
||||||
* org-latex.el (org-export-latex-make-header): Define the align
|
* org-latex.el (org-export-latex-make-header): Define the align
|
||||||
macro if it is not yet defined.
|
macro if it is not yet defined.
|
||||||
|
|
||||||
|
|
|
@ -10161,6 +10161,8 @@ changes. Such blocking occurs when:
|
||||||
3. The parent of the task is blocked because it has siblings that should
|
3. The parent of the task is blocked because it has siblings that should
|
||||||
be done first, or is child of a block grandparent TODO entry."
|
be done first, or is child of a block grandparent TODO entry."
|
||||||
|
|
||||||
|
(if (not org-enforce-todo-dependencies)
|
||||||
|
t ; if locally turned off don't block
|
||||||
(catch 'dont-block
|
(catch 'dont-block
|
||||||
;; If this is not a todo state change, or if this entry is already DONE,
|
;; If this is not a todo state change, or if this entry is already DONE,
|
||||||
;; do not block
|
;; do not block
|
||||||
|
@ -10208,7 +10210,7 @@ changes. Such blocking occurs when:
|
||||||
(when (and (org-entry-get (point) "ORDERED")
|
(when (and (org-entry-get (point) "ORDERED")
|
||||||
(forward-line 1)
|
(forward-line 1)
|
||||||
(re-search-forward org-not-done-heading-regexp pos t))
|
(re-search-forward org-not-done-heading-regexp pos t))
|
||||||
(throw 'dont-block nil))))))) ; block, older sibling not done.
|
(throw 'dont-block nil)))))))) ; block, older sibling not done.
|
||||||
|
|
||||||
(defcustom org-track-ordered-property-with-tag nil
|
(defcustom org-track-ordered-property-with-tag nil
|
||||||
"Should the ORDERED property also be shown as a tag?
|
"Should the ORDERED property also be shown as a tag?
|
||||||
|
@ -10252,6 +10254,8 @@ See variable `org-track-ordered-property-with-tag'."
|
||||||
"Block turning an entry into a TODO, using checkboxes.
|
"Block turning an entry into a TODO, using checkboxes.
|
||||||
This checks whether the current task should be blocked from state
|
This checks whether the current task should be blocked from state
|
||||||
changes because there are unchecked boxes in this entry."
|
changes because there are unchecked boxes in this entry."
|
||||||
|
(if (not org-enforce-todo-checkbox-dependencies)
|
||||||
|
t ; if locally turned off don't block
|
||||||
(catch 'dont-block
|
(catch 'dont-block
|
||||||
;; If this is not a todo state change, or if this entry is already DONE,
|
;; If this is not a todo state change, or if this entry is already DONE,
|
||||||
;; do not block
|
;; do not block
|
||||||
|
@ -10275,7 +10279,7 @@ changes because there are unchecked boxes in this entry."
|
||||||
(if (boundp 'org-blocked-by-checkboxes)
|
(if (boundp 'org-blocked-by-checkboxes)
|
||||||
(setq org-blocked-by-checkboxes t))
|
(setq org-blocked-by-checkboxes t))
|
||||||
(throw 'dont-block nil)))))
|
(throw 'dont-block nil)))))
|
||||||
t)) ; do not block
|
t))) ; do not block
|
||||||
|
|
||||||
(defun org-entry-blocked-p ()
|
(defun org-entry-blocked-p ()
|
||||||
"Is the current entry blocked?"
|
"Is the current entry blocked?"
|
||||||
|
|
Loading…
Reference in New Issue