From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Org Clock Error Date: Fri, 15 Jan 2016 15:27:41 -0500 Message-ID: <87ziw637wi.fsf@alphaville.usersys.redhat.com> References: <87ziw9aqxi.fsf@pierrot.dokosmarshall.org> <84fuy0mtvq.fsf@gmail.com> <87twmg5ezv.fsf@alphaville.usersys.redhat.com> <87lh7s5asg.fsf@alphaville.usersys.redhat.com> <84r3hjcdfx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKAyT-0005Vd-1o for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 15:27:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKAyO-00023m-1E for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 15:27:56 -0500 Received: from plane.gmane.org ([80.91.229.3]:50306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKAyN-00023f-Qm for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 15:27:51 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aKAyJ-00062k-7O for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 21:27:47 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Jan 2016 21:27:47 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Jan 2016 21:27:47 +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 Marco Wahl writes: >>>> 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) >>>> > ... >> OK - here's some actual research for a change. I was wondering what >> >> (defvar org-state) >> >> actually does, so I looked at the source code for defvar. It contains >> this comment: >> >> ,---- >> | else if (!NILP (Vinternal_interpreter_environment) >> | && !XSYMBOL (sym)->declared_special) >> | /* A simple (defvar foo) with lexical scoping does "nothing" except >> | declare that var to be dynamically scoped *locally* (i.e. within >> | the current file or let-block). */ >> | Vinternal_interpreter_environment >> | = Fcons (sym, Vinternal_interpreter_environment); >> | else >> `---- >> >> so it seems to be only active *for that file*: you need "(defvar org-state)" in >> each file that uses the variable. > > Thanks for sharing your insights! This looks good to me. I just > committed your suggestion. > Thanks! I hope it's correct :-) -- Nick