emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marcel van der Boom <marcel@hsdev.com>
To: Marcel van der Boom <marcel@hsdev.com>
Cc: Bernt Hansen <bernt@norang.ca>, emacs-orgmode@gnu.org
Subject: Re: [PATCH] Subtasks are blocked in todo-items of ordered projects. Bug?
Date: Tue, 21 Jun 2011 15:48:53 +0200	[thread overview]
Message-ID: <20110621154853.2d3e5945@hsdev.com> (raw)
In-Reply-To: <20110621134040.04455451@hsdev.com>


[-- Attachment #1.1: Type: text/plain, Size: 883 bytes --]


On di 21-jun-2011 13:40
Marcel van der Boom <marcel@hsdev.com> 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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: block-ignore-ancestor-siblings.patch --]
[-- Type: text/x-patch, Size: 1492 bytes --]

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?

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5618 bytes --]

      parent reply	other threads:[~2011-06-21 13:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 13:50 Subtasks are blocked in todo-items of ordered projects. Bug? Marcel van der Boom
2011-06-20 23:37 ` Bernt Hansen
2011-06-21  8:59   ` Marcel van der Boom
2011-06-21 11:15     ` Memnon Anon
2011-06-21 11:30     ` Bernt Hansen
2011-06-21 11:40       ` Marcel van der Boom
2011-06-21 11:54         ` Carsten Dominik
2011-06-21 12:22           ` Carsten Dominik
2011-06-21 13:48         ` Marcel van der Boom [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110621154853.2d3e5945@hsdev.com \
    --to=marcel@hsdev.com \
    --cc=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).