emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [BUG] org clock history no longer loaded from org-clock-persist-file
Date: Mon, 04 Jan 2016 09:32:16 -0600	[thread overview]
Message-ID: <8760z98inz.fsf@fastmail.fm> (raw)

With the shift to lexical-binding in org-clock.el (commit
35bc1c8853c5cfe37930e3540a944a328af5198b), the function org-load-clock
fails to load the stored data in org-clock-persist-file.

These are the relevant setting in my .emacs:

(setq org-clock-persist t)
(setq org-clock-persist-file "~/data/org-clock-save.el")
(org-clock-persistence-insinuate)

Expected result: After calling the agenda for the first time, the
variable org-clock-history is populated with data.

Actual result: org-clock-history remains nil.

As far as I can tell, the problem lies with the call to load-file (line
2986). Because of the lexical binding, the (setq stored-clock-history
....) statement stored in the org-clock-persist-file is evaluated but
because of the lexical scoping it has no effect on the
stored-clock-history in org-clock-load.

Ironically, this also means that stored-clock-history is defined as an
irrelevant global variable even while it remains undefined within
org-load-clock as a local variable. (Before lexical binding, the
opposite was the case: the call to load-file bound stored-clock-history
locally, but not globally).

Best,
Matt

             reply	other threads:[~2016-01-04 15:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04 15:32 Matt Lundin [this message]
2016-01-06 14:10 ` [BUG] org clock history no longer loaded from org-clock-persist-file Nicolas Goaziou

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=8760z98inz.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --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).