Nick Dokos <ndo...@gmail.com> writes: > These are all guesses, untainted by actual knowledge or research. >
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. -- Nick