[oni-org] Fix ‘oni-org-pomodoro-times’ for when no logbook exists
This commit is contained in:
parent
af7ff9343a
commit
aec7aa6267
1 changed files with 9 additions and 9 deletions
|
@ -1021,7 +1021,7 @@ placed above TARGET. Otherwise it will be placed below it."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char entry-beginning)
|
(goto-char entry-beginning)
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(re-search-forward org-logbook-drawer-re entry-end)
|
(when (re-search-forward org-logbook-drawer-re entry-end nil)
|
||||||
(let ((logbook-beginning (match-beginning 0))
|
(let ((logbook-beginning (match-beginning 0))
|
||||||
(logbook-end (match-end 0)))
|
(logbook-end (match-end 0)))
|
||||||
(goto-char logbook-beginning)
|
(goto-char logbook-beginning)
|
||||||
|
@ -1029,7 +1029,7 @@ placed above TARGET. Otherwise it will be placed below it."
|
||||||
(rx "Finished a pomodoro on "
|
(rx "Finished a pomodoro on "
|
||||||
(group "[" (one-or-more (not "]")) "]"))
|
(group "[" (one-or-more (not "]")) "]"))
|
||||||
logbook-end t)
|
logbook-end t)
|
||||||
(push (org-parse-time-string (match-string 1)) results)))))
|
(push (org-parse-time-string (match-string 1)) results))))))
|
||||||
results))
|
results))
|
||||||
|
|
||||||
(defun oni-org-pomodoro-times-for-date (date)
|
(defun oni-org-pomodoro-times-for-date (date)
|
||||||
|
|
Loading…
Reference in a new issue