Closed LeoUfimtsev closed 9 years ago
I hacked myself a little workaround that kinda works for the time being. It goes to the entry and expands the logbook drawer before calling the function. Unfortunately I lack the lisp knowledge to figure out how to fix it without manually expanding the drawer first.
(defun my/org-pomodoro-append-time ()
"Append time to the previous pomodoro. The time added is from when you last finished the pomodoro till now"
(interactive)
; WORKAROUND, function below is broken, to work around it we goto logbook and expand it.
;Move to current logbook
(org-clock-goto)
(search-forward ":LOGBOOK:")
(org-cycle)
(org-pomodoro-extend-last-clock) ; BROKEN When using logdrawers. Awaiting fix: https://github.com/lolownia/org-pomodoro/issues/26
)
Awesome! I think that is the right way to fix this. Depending on the expected behavior I would add a save-excursion
or save-window-excursion
. I will add a fix this weekend.
:-)
Sorry, it took a while for me, to find a little time. Version 2.0.2 makes sure the LOGBOOK drawer is expanded.
In this issue a new function was added: https://github.com/lolownia/org-pomodoro/issues/19
org-pomodoro-extend-last-clock
Now if if you customize
org-clock-into-drawer
and set it to clock into drawers always. Then if you start a pomodoro, when it ends, if your :LOGBOOK: is collapsed and you executeorg-pomodoro-extend-last-clock
, then it breaks the LOGBOOK. I.e the :END: tag is destroyed and things don't function properly any more.I tried to fix it with something like:
But haven't been very successful thus far :-/