From 011f0ce2f97f7862bbb25cc4342cf1ea575e5b77 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 10 Jan 2022 22:06:12 -0800 Subject: [PATCH] [oni-org] Add a simple Pomodoro duration I'm trying out the Pomodoro Technique and one of the things you're supposed to do is estimate your tasks in pomodoros. This change lets me estimate in, for example, 1p (20min) based on my specified pomodoro duration. --- oni-org/oni-org.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el index 3e40f23..58f5f5a 100644 --- a/oni-org/oni-org.el +++ b/oni-org/oni-org.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2021.1201.133943 +;; Version: 2022.0110.220554 ;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-contrib org-bullets org-edna diminish all-the-icons olivetti mixed-pitch) ;; This program is free software; you can redistribute it and/or modify @@ -771,5 +771,16 @@ This is an around advice for ‘org-html--svg-image’ as FUN." (advice-add 'org-html--svg-image :around #'oni-org-html-svg-image-embed) +;;; Pomodoro + +;; Add my current pomodoro time duration so that I can make estimates in +;; Pomodoros like 1p. +(defconst oni-org-pomodoro-duration 20 + "The duration in minutes of a single pomodoro.") + +(with-eval-after-load 'org-duration + (add-to-list 'org-duration-units `("p" . ,oni-org-pomodoro-duration)) + (org-duration-set-regexps)) + (provide 'oni-org) ;;; oni-org.el ends here