org-mode/lisp
Carsten Dominik 4c3bc6482d Only save clock stuff if it has been loaded as well
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:
2009-10-25 07:48:05 +01:00
..
ChangeLog Only save clock stuff if it has been loaded as well 2009-10-25 07:48:05 +01:00
ChangeLog.01 Split ChangeLog file into parts. 2008-05-08 08:16:38 +02:00
org-agenda.el Keep compiler happy 2009-10-23 10:13:37 +02:00
org-archive.el Rewrite of org-mobile.org, for MobileOrg build 18 2009-10-10 23:01:33 +02:00
org-ascii.el Add option to keep vertical lines in ASCII tables 2009-10-23 12:35:24 +02:00
org-attach.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-bbdb.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-bibtex.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-clock.el Only save clock stuff if it has been loaded as well 2009-10-25 07:48:05 +01:00
org-colview-xemacs.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-colview.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-compat.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-crypt.el Fix copyright in org-crypt.el 2009-10-01 20:04:42 +02:00
org-docbook.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-exp-blocks.el org-exp-blocks removing Sweave functionality (this functionality now lives in org-babel) 2009-10-23 16:02:26 -06:00
org-exp.el Minor fixes 2009-10-15 07:59:15 +02:00
org-faces.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-feed.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-footnote.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-gnus.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-habit.el Further simplifications to org-habit.el 2009-10-23 20:43:55 -04:00
org-html.el Don't wrap figures without captions 2009-10-02 08:29:21 +02:00
org-icalendar.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-id.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-indent.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-info.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-inlinetask.el Change default for org-inlinetask-export to t 2009-10-13 00:00:19 +02:00
org-irc.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-jsinfo.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-latex.el LaTeX export: Protect \vspace macro in verse environment 2009-10-21 10:36:42 +02:00
org-list.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-mac-message.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-macs.el LaTeX export: Don't format tables in protected regions 2009-10-07 08:10:05 +02:00
org-mew.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-mhe.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-mobile.el Allow file names relative to org-directory in org-agenda-files 2009-10-23 22:19:23 +02:00
org-mouse.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-plot.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-protocol.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-publish.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-remember.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-rmail.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-src.el Merge commit 'org/master' into ded-org-src 2009-10-15 10:29:23 -04:00
org-table.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-timer.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-vm.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-w3m.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-wl.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org-xoxo.el Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
org.el Allow display of fractional times with C-c C-x C-d 2009-10-23 22:23:32 -04:00