Browse Source

Blocking: Do not block transition to a nil TODO state

Samuel Wales writes:

> I find that changing a task from a todoish state to blank
> causes blocking to occur.  I normally want all todo state
> changes except those to doneish states to be non-blocked.
>
> I think the issue might be that blank is special-cased, as
> if it were a doneish state.  I would prefer blank to be a
> todoish state just like any other.
Carsten Dominik 15 năm trước cách đây
mục cha
commit
71ed40b3be
2 tập tin đã thay đổi với 10 bổ sung2 xóa
  1. 6 0
      lisp/ChangeLog
  2. 4 2
      lisp/org.el

+ 6 - 0
lisp/ChangeLog

@@ -1,3 +1,9 @@
+2009-11-12  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.el (org-block-todo-from-children-or-siblings-or-parent)
+	(org-block-todo-from-checkboxes): Do not block changes to a nil
+	TODO state.
+
 2009-11-12  James TD Smith  <ahktenzero@mohorovi.cc>
 
 	* org-habit.el (org-habit-parse-todo): Indicate which habit is

+ 4 - 2
lisp/org.el

@@ -9894,7 +9894,8 @@ changes.  Such blocking occurs when:
 	      (member (plist-get change-plist :from)
 		      (cons 'done org-done-keywords))
 	      (member (plist-get change-plist :to)
-		      (cons 'todo org-not-done-keywords)))
+		      (cons 'todo org-not-done-keywords))
+	      (not (plist-get change-plist :to)))
       (throw 'dont-block t))
     ;; If this task has children, and any are undone, it's blocked
     (save-excursion
@@ -9984,7 +9985,8 @@ changes because there are uncheckd boxes in this entry."
 	      (member (plist-get change-plist :from)
 		      (cons 'done org-done-keywords))
 	      (member (plist-get change-plist :to)
-		      (cons 'todo org-not-done-keywords)))
+		      (cons 'todo org-not-done-keywords))
+	      (not (plist-get change-plist :to)))
       (throw 'dont-block t))
     ;; If this task has checkboxes that are not checked, it's blocked
     (save-excursion