1
0
Fork 0

[oni-org] Fix ‘oni-org-pomodoro-times’ for when no logbook exists

This commit is contained in:
Tom Willemse 2023-03-20 22:57:16 -07:00
parent af7ff9343a
commit aec7aa6267

View file

@ -1021,15 +1021,15 @@ placed above TARGET. Otherwise it will be placed below it."
(save-excursion
(goto-char entry-beginning)
(save-match-data
(re-search-forward org-logbook-drawer-re entry-end)
(let ((logbook-beginning (match-beginning 0))
(logbook-end (match-end 0)))
(goto-char logbook-beginning)
(while (re-search-forward
(rx "Finished a pomodoro on "
(group "[" (one-or-more (not "]")) "]"))
logbook-end t)
(push (org-parse-time-string (match-string 1)) results)))))
(when (re-search-forward org-logbook-drawer-re entry-end nil)
(let ((logbook-beginning (match-beginning 0))
(logbook-end (match-end 0)))
(goto-char logbook-beginning)
(while (re-search-forward
(rx "Finished a pomodoro on "
(group "[" (one-or-more (not "]")) "]"))
logbook-end t)
(push (org-parse-time-string (match-string 1)) results))))))
results))
(defun oni-org-pomodoro-times-for-date (date)