emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Org Clock Error
Date: Fri, 15 Jan 2016 15:27:41 -0500	[thread overview]
Message-ID: <87ziw637wi.fsf@alphaville.usersys.redhat.com> (raw)
In-Reply-To: 84r3hjcdfx.fsf@gmail.com

Marco Wahl <marcowahlsoft@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

      reply	other threads:[~2016-01-15 20:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13 22:38 Org Clock Error Mike McLean
2016-01-14  1:30 ` Nick Dokos
2016-01-14  8:45   ` Marco Wahl
2016-01-14 15:59     ` Nick Dokos
2016-01-14 17:30       ` Nick Dokos
2016-01-15 11:03         ` Marco Wahl
2016-01-15 20:27           ` Nick Dokos [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ziw637wi.fsf@alphaville.usersys.redhat.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).