📝How-to: Org-mode timers

tags

#how-to

Org-mode timers allow starting a timer and then inserting the current timer value into the document, or running time-annotated list. Useful for watching videos or making notes during recorded sessions.

(defun rasen/org-timer ()
  (interactive)
  (unless (= (point) (line-beginning-position))
    (forward-char))
  (org-timer))

(general-def :keymaps 'org-mode-map :states 'motion
  "z t" #'org-timer-start
  "z T" #'org-timer-stop
  "z ," #'org-timer-pause-or-continue)

(general-def :keymaps 'org-mode-map :states 'normal
  "z ." #'rasen/org-timer
  "z -" #'org-timer-item)

(general-def :keymaps 'org-mode-map :states 'insert
  "M-." #'org-timer)
  • org-timer-start (re)starts the timer (sets timer value with C-u)

  • org-timer-stop to stop the timer

  • org-timer-pause-or-continue to pause or resume the timer

  • org-timer inserts the current timer value into the buffer

  • org-timer-item starts a time-annotated list

  • M-RET continues the list (also works with evil’s o)

Q

  • How to synchronize the timer with youtube video? so when I pause/resume the video, the timer pauses/resumes accordingly

Resources