emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [BUG] org clock history no longer loaded from org-clock-persist-file


From: Matt Lundin
Subject: [O] [BUG] org clock history no longer loaded from org-clock-persist-file
Date: Mon, 04 Jan 2016 09:32:16 -0600
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]