From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Wahl Subject: Re: Org Clock Error Date: Fri, 15 Jan 2016 12:03:14 +0100 Message-ID: <84r3hjcdfx.fsf@gmail.com> References: <87ziw9aqxi.fsf@pierrot.dokosmarshall.org> <84fuy0mtvq.fsf@gmail.com> <87twmg5ezv.fsf@alphaville.usersys.redhat.com> <87lh7s5asg.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aK2AA-0001uO-FZ for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 06:03:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aK2A7-0006DM-6o for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 06:03:26 -0500 Received: from plane.gmane.org ([80.91.229.3]:42363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aK2A6-0006DI-W5 for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 06:03:23 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aK2A5-0000eC-Dx for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 12:03:21 +0100 Received: from x5f701578.dyn.telefonica.de ([95.112.21.120]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Jan 2016 12:03:21 +0100 Received: from marcowahlsoft by x5f701578.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Jan 2016 12:03:21 +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 Cc: Nick Dokos , Mike McLean >>> 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. Best regards, -- Marco Wahl GPG: 0x49010A040A3AE6F2