0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 22:07:49 +00:00

org-depend: Fix blocking logic

* contrib/lisp/org-depend.el (org-depend-block-todo): Fix blocking logic.

Paul Sexton writes:

> The value returned by org-depend-block-todo determines whether an item
> is considered "blocked", and thus whether it is shown dimmed (because
> this function is added to org-blocker-hook).
>
> o-d-b-t only returns true in a very limited set of conditions, so very
> often items which should show up as blocked, do not. To be honest I
> don't remember the exact details, but it did not work before I applied
> the patch, and has worked correctly ever since.
This commit is contained in:
Carsten Dominik 2010-08-11 11:16:11 +02:00
parent 0633c6aa09
commit 2f9d095617

View file

@ -224,11 +224,12 @@ this ID property, that entry is also checked."
blocker blockers bl p1 blocker blockers bl p1
(proceed-p (proceed-p
(catch 'return (catch 'return
(unless (eq type 'todo-state-change) ;; If this is not a todo state change, or if this entry is
;; We are not handling this kind of change ;; DONE, do not block
(throw 'return t)) (when (or (not (eq type 'todo-state-change))
(unless (and (not from) (member to org-not-done-keywords)) (member from (cons 'done org-done-keywords))
;; This is not a change from nothing to TODO, ignore it (member to (cons 'todo org-not-done-keywords))
(not to))
(throw 'return t)) (throw 'return t))
;; OK, the plan is to switch from nothing to TODO ;; OK, the plan is to switch from nothing to TODO