emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-depend only blocks null->TODO state change
@ 2010-07-27  1:52 Paul Sexton
  2010-08-11  7:57 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Sexton @ 2010-07-27  1:52 UTC (permalink / raw)
  To: emacs-orgmode

In agenda view, tasks which are supposed to be blocked using org-depend's
:BLOCKER: property, are not actually blocked and do not show up dimmed.

This is because of a logic error in 'org-depend-block-undo', hopefully 
fixed below.

index eb38aa0..84fa1a7 100644
--- a/d:/paul/dotemacs/site-lisp/org/contrib/lisp/org-depend.el
+++ b/d:/paul/dotemacs/site-lisp/org/contrib/lisp/org-depend-new.el
@@ -224,12 +224,13 @@ this ID property, that entry is also checked."
         blocker blockers bl p1
          (catch 'return
-           (unless (eq type 'todo-state-change)
-             ;; We are not handling this kind of change
-             (throw 'return t))
-           (unless (and (not from) (member to org-not-done-keywords))
-             ;; This is not a change from nothing to TODO, ignore it
-             (throw 'return t))
+            ;; If this is not a todo state change, or if this entry is 
+            ;; DONE, do not block
+            (when (or (not (eq type 'todo-state-change))
+                      (member from (cons 'done org-done-keywords))
+                      (member to (cons 'todo org-not-done-keywords))
+                      (not to))
+              (throw 'return t))

            ;; OK, the plan is to switch from nothing to TODO
            ;; Lets see if we will allow it.  Find the BLOCKER property

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-11  7:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-27  1:52 [PATCH] org-depend only blocks null->TODO state change Paul Sexton
2010-08-11  7:57 ` Carsten Dominik

Code repositories for project(s) associated with this public inbox


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).