emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] clock-in clock-out problems


From: Sebastien Vauban
Subject: Re: [O] clock-in clock-out problems
Date: Tue, 19 Aug 2014 09:55:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (windows-nt)

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




reply via email to

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