On di 21-jun-2011 13:40 Marcel van der Boom <[email protected]> wrote:
>> You can also force the task state to DONE with a triple prefix (C-u >> C-u C-u C-c C-t d) which will ignore the blocking rules for this >> state change. > I think I'll use this, sounds the simplest for my usecase. On second thought, the patch is quite minimal, I've applied the attached patch in my branch which seems to do what I want. I'd obviously welcome this being applied in the main tree, but I can understand if it won't. What would be nice in general if the message that is produced contained a hint on why the entry was blocked by the system (children incomplete, sibling blocked etc.) Thanks everyone for the help. marcel -- Marcel van der Boom -- http://hsdev.com/mvdb.vcf HS-Development BV -- http://www.hsdev.com We use bitcoin! -- http://bitcoin.org
diff --git a/lisp/org.el b/lisp/org.el index fee3174..c28d355 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -2181,6 +2181,17 @@ to change is while Emacs is running is through the customize interface." :group 'org-todo :type 'boolean) +(defcustom org-blocker-ignore-ancestor-siblings nil + "Non-nil means that when determining if a TODO entry is blocked, +siblings of entries which are higher up the hierarchy are not +considered. This allows to register state changes for item in +subprojects of ordered projects which enforce ordering. The +subproject itself is not affected. See +`org-block-todo-from-children-or-siblings-or-parent' for the +implementation." + :group 'org-todo + :type 'boolean) + (defcustom org-enforce-todo-checkbox-dependencies nil "Non-nil means unchecked boxes will block switching the parent to DONE. When this is nil, checkboxes have no influence on switching TODO states. @@ -11151,7 +11162,8 @@ changes. Such blocking occurs when: (when (and (org-not-nil (org-entry-get (point) "ORDERED")) (forward-line 1) (re-search-forward org-not-done-heading-regexp pos t)) - (throw 'dont-block nil)))))))) ; block, older sibling not done. + ; block, older sibling not done, unless configured to ignore. + (throw 'dont-block org-blocker-ignore-ancestor-siblings)))))))) (defcustom org-track-ordered-property-with-tag nil "Should the ORDERED property also be shown as a tag?
smime.p7s
Description: S/MIME cryptographic signature
