From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: clock-in clock-out problems Date: Tue, 19 Aug 2014 08:32:46 -0400 Message-ID: <87bnrgzmkx.fsf@pierrot.dokosmarshall.org> References: <87siktslfr.fsf@snow.nl> <87ha19r22x.fsf@alphaville.bos.redhat.com> <861tscap7s.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJib7-0006iw-4L for emacs-orgmode@gnu.org; Tue, 19 Aug 2014 08:33:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJiay-000810-FS for emacs-orgmode@gnu.org; Tue, 19 Aug 2014 08:33:09 -0400 Received: from plane.gmane.org ([80.91.229.3]:39989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJiay-00080f-8U for emacs-orgmode@gnu.org; Tue, 19 Aug 2014 08:33:00 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XJiaw-0005Tu-Lt for emacs-orgmode@gnu.org; Tue, 19 Aug 2014 14:32:58 +0200 Received: from pool-173-48-174-104.bstnma.fios.verizon.net ([173.48.174.104]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Aug 2014 14:32:58 +0200 Received: from ndokos by pool-173-48-174-104.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Aug 2014 14:32:58 +0200 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Sebastien Vauban 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