Sebastien Vauban <sva-n...@mygooglest.com>
writes:

> 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:
>
> (add-hook 'org-mode-hook
>           (lambda ()
>             (require 'org-clock)
>             (setq org-clock-persist t)
>             (org-clock-persistence-insinuate)))
>

There may indeed be cleverer ways of loading it: I didn't worry about that.
I was more interested in seeing whether I could reproduce the OP's
problem (FWIW, I'm not using clocking).

-- 
Nick


Reply via email to