Marco Wahl <marcowahls...@gmail.com> 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