0

C-C C-x ; can start count down timer. But I want to start the timer whenever I open any org file. I want to set it default for 10 minute. Kindly help

1 Answer 1

2

Have you tried adding the function to org-mode-hook?

If you haven't tried it yet, what I would recommend is to create a function my-org-mode-hook-function which evaluates (org-timer-set-timer 10). Then add to your .emacs file the expression (add-hook 'org-mode-hook 'my-org-mode-hook-function).

6
  • How do you create a hook.? Kindly explain
    – Vaibhav
    Jan 16, 2018 at 9:41
  • You don't create any hook. org-mode-hook is a pre-existing emacs variable, meant to contain a list of functions to be evaluated when starting org-mode. Jan 16, 2018 at 10:16
  • Can you teach me how you create a function my-org-mode-hook-function which evaluates (org-timer-set-timer 10. Kinldy oblige
    – Vaibhav
    Jan 16, 2018 at 10:56
  • 1
    (defun my-org-mode-hook-function () (org-timer-set-timer 10)) Jan 16, 2018 at 11:05
  • gets error. End of file during parsing
    – Vaibhav
    Jan 16, 2018 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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