forked from mirrors/org-mode
4c3bc6482d
Kai Tetzlaff writes: > i noticed that when using the org-mode clock persistence, the > stored clock data gets deleted when i start emacs and exit again > without turning on org-mode in between. > > When looking at org-clock-persistence-insinuate it looks like > org-clock load will only run after org-mode gets started whereas > org-clock-save will always be called when exiting emacs: > > (defun org-clock-persistence-insinuate () > "Set up hooks for clock persistence" > (add-hook 'org-mode-hook 'org-clock-load) > (add-hook 'kill-emacs-hook 'org-clock-save)) > > Not running org-mode-hook (i.e. not starting org-mode) thus does > not load clock data but org-clock-save overwrites any prviously > saved data when exiting emacs. > > An easy fix for that would be to just add org-clock-load to e.g. > emacs-startup-hook. But this will only work if the code in > org-clock-load does not depend on any org-mode initialization > code (or would require loading org-mode). > > So org-clock-save should probably check if org-clock-load has > been running during the current emacs session (or if clock > persistence was just enabled) and only then save clock data when > exiting emacs. I tried to add this to the code in org-clock-save: |
||
---|---|---|
.. | ||
ChangeLog | ||
ChangeLog.01 | ||
org-agenda.el | ||
org-archive.el | ||
org-ascii.el | ||
org-attach.el | ||
org-bbdb.el | ||
org-bibtex.el | ||
org-clock.el | ||
org-colview-xemacs.el | ||
org-colview.el | ||
org-compat.el | ||
org-crypt.el | ||
org-docbook.el | ||
org-exp-blocks.el | ||
org-exp.el | ||
org-faces.el | ||
org-feed.el | ||
org-footnote.el | ||
org-gnus.el | ||
org-habit.el | ||
org-html.el | ||
org-icalendar.el | ||
org-id.el | ||
org-indent.el | ||
org-info.el | ||
org-inlinetask.el | ||
org-irc.el | ||
org-jsinfo.el | ||
org-latex.el | ||
org-list.el | ||
org-mac-message.el | ||
org-macs.el | ||
org-mew.el | ||
org-mhe.el | ||
org-mobile.el | ||
org-mouse.el | ||
org-plot.el | ||
org-protocol.el | ||
org-publish.el | ||
org-remember.el | ||
org-rmail.el | ||
org-src.el | ||
org-table.el | ||
org-timer.el | ||
org-vm.el | ||
org-w3m.el | ||
org-wl.el | ||
org-xoxo.el | ||
org.el |