[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Org Clock Error

From: Marco Wahl
Subject: Re: [O] Org Clock Error
Date: Thu, 14 Jan 2016 09:45:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Nick Dokos <address@hidden> writes:

> Mike McLean <address@hidden> 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.

Manually tested your suggestion and it fixes the issue of '(void-variable

Technically I'm not sure what a reliable fix looks like.  There is
e.g. already the line

(defvar org-state) ;; dynamically scoped into this function

in org-clock.el.

Best regards,
Marco Wahl
GPG: 0x49010A040A3AE6F2

reply via email to

[Prev in Thread] Current Thread [Next in Thread]