From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastien Vauban Subject: Re: clock-in clock-out problems Date: Tue, 19 Aug 2014 09:55:03 +0200 Message-ID: <861tscap7s.fsf@somewhere.org> References: <87siktslfr.fsf@snow.nl> <87ha19r22x.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org 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