emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: clock-in clock-out problems
Date: Tue, 19 Aug 2014 09:55:03 +0200	[thread overview]
Message-ID: <861tscap7s.fsf@somewhere.org> (raw)
In-Reply-To: 87ha19r22x.fsf@alphaville.bos.redhat.com

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

  parent reply	other threads:[~2014-08-19  7:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18 15:40 clock-in clock-out problems hymie!
2014-08-18 18:26 ` Joost Helberg
2014-08-18 19:02   ` hymie!
2014-08-18 20:10     ` Nick Dokos
2014-08-18 20:18       ` Nick Dokos
2014-08-18 20:55       ` hymie!
2014-08-18 21:39         ` Nick Dokos
2014-08-19  3:23           ` hymie!
2014-08-19 15:01             ` hymie!
2014-08-19 15:51               ` Nick Dokos
2014-08-19 18:21                 ` hymie!
2014-08-19 20:46                   ` hymie!
2014-08-19 22:42                     ` Nick Dokos
2014-08-22 13:55                       ` Bastien
2014-08-19  7:55       ` Sebastien Vauban [this message]
2014-08-19 12:32         ` Nick Dokos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=861tscap7s.fsf@somewhere.org \
    --to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).