2

If I open emacs and do a C-c C-x C-k I get the message, No active or recent clock task. In such a case, where I have not yet clocked a task since I started emacs, can I instead get org-clock-goto to find the most recently clocked task from the files in my agenda list?

  • What's your org-mode configuration, you might have not save org-clock session info. There is a command to do that. – stardiviner Oct 18 '15 at 10:11
2

Here is code to always save clock session info to file.

;;; To save the clock history across Emacs sessions, use
(if (file-exists-p org-clock-persist-file)
    ;; (setq org-clock-persist 'history)
    (org-clock-persistence-insinuate)
  (shell-command (concat "touch " org-clock-persist-file)))
| improve this answer | |
  • I am able to evaluate this once org-mode has been fully loaded, but if I put it in my init.el file, emacs complains that org-clock-persist-file doesn't exist. I tried a simple hook but that didn't fix the problem. – Brian Z Oct 21 '15 at 11:01
  • 1
    @BrianZ You need to load org-timer and org-clock. – stardiviner Oct 21 '15 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.