From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: [PATCH] Re: TODO state change from TODO to DONE blocked Date: Fri, 04 Mar 2011 16:15:37 +0100 Message-ID: <80d3m6rk6e.fsf_-_@somewhere.org> References: <80lj15yab6.fsf@somewhere.org> <80wrkp4dwo.fsf@somewhere.org> <87pqqeafov.fsf@gnu.org> <80hbbjq690.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Bastien, S=C3=A9bastien Vauban wrote: > Bastien wrote: >>>> I've a really weird exception occurring: change state from TODO to DON= E is >>>> blocked... while I'm on a leaf of the Org tree!? >>>> >>>> Debugger entered--Lisp error: (error #("TODO state change from TODO to >>>> DONE blocked" 23 27 (face org-todo) 31 35 (face org-done))) >> >> Are you using `org-blocker-hook' or `org-trigger-hook'? >> >> Let us know. > > Though, hopping from one variable description to another, I remembered th= at I > had set the variable =3Dorg-enforce-todo-dependencies=3D to =3Dt=3D. Tryi= ng to set it > to =3Dnil=3D made the problem disappear... So, it was a bit narrowed. > > I could see in the description of that var that it could block state chan= ge if > tasks were ordered and a previous one not done. But I never use the order= ed > property. > > ... Well, never, but well in that parent tree. Was it for test purpose? = Did I > have something else in mind? I dunno anymore, but that property was > definitely the culprit. > > Doing so, I'm wondering: > > - if the output message could be updated to make it clear what the reason= is, > or can be? diff --git a/lisp/org.el b/lisp/org.el index 3a07cfd..fb60bc6 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10927,7 +10927,10 @@ For calling through lisp, arg is also interpreted = in the following way: (run-hook-with-args-until-failure 'org-blocker-hook change-plist))) (if (interactive-p) - (error "TODO state change from %s to %s blocked" this state) + (error (concat "TODO state change from %s to %s blocked " + "(because of undone child, or " + "parent with ORDERED property and undone prior sibling)") + this state) ;; fail silently (message "TODO state change from %s to %s blocked" this state) (throw 'exit nil)))) Best regards, Seb --=20 S=C3=A9bastien Vauban