8

I'm trying to make the Agenda Clockreport show how many pomodoros I've invested in a task. A Pomodoro is 25 minutes. For example, 1:15 hours of work is 3 pomodoros.

I'm trying to customize org-agenda-clockreport-paramater-plist, and I would like to extract "Time" and convert it to a pomodoro. I.e., (time in minutes / 25) = pomodoro.

I was considering using :formula from The Clock Table but I'm not sure where to begin or where to look for examples.

Is this technically possible somehow?

[edit Solution]
Thanks to Sacha's post, I use the config as following:

(setq org-agenda-clockreport-parameter-plist 
 '(:fileskip0 t :link t :maxlevel 2 :formula "$5=($3+$4)*(60/25);t"))

This creates a report that skips empty org-agenda files, has 2 levels depth and adds a column that shows pomodoros with 2 decimals. ('t' = time in hours).

E.g screenshot:

enter image description here

If you like, please remember to up-vote Sacha's answer.

11

This will create a column in your clocktable report that sums the hours from columns 3 and 4, and then another column that shows you the round number of pomodoros that took up.

(setq org-agenda-clockreport-parameter-plist 
      '(:link t :maxlevel 2 :formula "$5=$3+$4;t::$6=ceil($5*60/25);N"))

If you don't want in-between columns, here's a totally hackish approach:

(defun my/org-minutes-to-clocksum-string (m)
  "Format number of minutes as a clocksum string.
Shows the number of 25-minute pomodoros."
  (format "%dp" (ceiling (/ m 25))))
(fset 'org-minutes-to-clocksum-string 'my/org-minutes-to-clocksum-string)

Alternatively, you can use :formatter, but the formatting function looks very long and annoying to change.

Hope this helps!

  • Exactly what I was looking for :-D!!!. Thank you so much for your help!!. – Leo Ufimtsev Jun 3 '15 at 20:58

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.