mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 20:07:46 +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:
parent
0633c6aa09
commit
2f9d095617
|
@ -224,12 +224,13 @@ this ID property, that entry is also checked."
|
|||
blocker blockers bl p1
|
||||
(proceed-p
|
||||
(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
|
||||
|
|
Loading…
Reference in a new issue