From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Sexton Subject: [PATCH] org-depend only blocks null->TODO state change Date: Tue, 27 Jul 2010 01:52:54 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=41358 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdZM0-0000wN-He for emacs-orgmode@gnu.org; Mon, 26 Jul 2010 21:53:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OdZLz-0002Df-BN for emacs-orgmode@gnu.org; Mon, 26 Jul 2010 21:53:12 -0400 Received: from lo.gmane.org ([80.91.229.12]:43986) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdZLz-0002DR-64 for emacs-orgmode@gnu.org; Mon, 26 Jul 2010 21:53:11 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OdZLt-0003oz-UY for emacs-orgmode@gnu.org; Tue, 27 Jul 2010 03:53:08 +0200 Received: from rp.young.med.auckland.ac.nz ([130.216.140.20]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Jul 2010 03:53:05 +0200 Received: from psexton by rp.young.med.auckland.ac.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Jul 2010 03:53:05 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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 (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