From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Org Clock Error Date: Wed, 13 Jan 2016 20:30:17 -0500 Message-ID: <87ziw9aqxi.fsf@pierrot.dokosmarshall.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJWkF-00041V-Az for emacs-orgmode@gnu.org; Wed, 13 Jan 2016 20:30:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJWkC-0004pt-0f for emacs-orgmode@gnu.org; Wed, 13 Jan 2016 20:30:35 -0500 Received: from plane.gmane.org ([80.91.229.3]:55232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJWkB-0004pR-Pt for emacs-orgmode@gnu.org; Wed, 13 Jan 2016 20:30:31 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aJWkA-0005cv-6I for emacs-orgmode@gnu.org; Thu, 14 Jan 2016 02:30:30 +0100 Received: from pool-74-104-158-160.bstnma.fios.verizon.net ([74.104.158.160]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Jan 2016 02:30:30 +0100 Received: from ndokos by pool-74-104-158-160.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Jan 2016 02:30:30 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Mike McLean writes: > Hello > > In the last few days I started getting an error when moving tasks to the DONE state. > > I have ~(setq org-clock-out-when-done t)~ in my Emacs configuration.  > > I get the following back trace when I mark a task as done: > > Debugger entered--Lisp error: (void-variable org-state) > (member org-state org-done-keywords) > ... > org-clock-out-if-current() > run-hooks(org-after-todo-state-change-hook) > ... > org-todo(nil) This is probably a lexical binding problem: org-state is supposed to be dynamically bound by org-todo and then used by org-clock-out-if-current, but it seems that the communication is lost. I'm not sure what the solution is (I haven't really followed the upstream discussion), but I wonder if adding (defvar org-state) in org.el, just before the (defun org-todo ... line is enough to resolve the problem (basically letting org-todo know that org-state is dynamically bound). Untested and possibly wrong. -- Nick