Nick Dokos wrote:
> I added the following to my .emacs
>
> (require 'org-clock)
> (setq org-clock-persist t)
> (org-clock-persistence-insinuate)
>
> I then start a clock, exit, restart emacs, get asked the "Resume
> clock" question, say "y", work for a while, stop the clock and
> everything seems OK.
FWIW, what I don't like with this approach is that requiring org-clock
requires the full Org, and that can take a (little) while, depending on
the number of files we do have in `org-agenda-files', a.o.
Remember that Carsten was advocating me to remove the call
`(org-agenda-list)' from my .emacs file, mainly for making Emacs more
usable for command-line usage, etc.
The approach I'd rather like to follow is to call the persistence
functions as soon as the first Org buffer gets opened (in a new Emacs
session).
Maybe the following is enough -- I didn't test it yet:
--8<---------------cut here---------------start------------->8---
(add-hook 'org-mode-hook
(lambda ()
(require 'org-clock)
(setq org-clock-persist t)
(org-clock-persistence-insinuate)))
--8<---------------cut here---------------end--------------->8---
Best regards,
Seb
--
Sebastien Vauban