Hello, Marcin Borkowski <mb...@mbork.pl> writes:
> Let me hijack this thread a bit;-), since my issue seems similar. > I need to get the number of minutes just clocked (so only the last clock > entry) in org-clock-out-hook. Currently, what I'm doing is very > hackish: I check current-message for regex "LINE REMOVED$", and if it > doesn't match, I do looking-back with a regex catching things like 0:12. > All this seems extremely fragile. Is there a better way? (Probably > yes, but what is it?) Point should be on clocked out clock when `org-clock-out-hook' is run. You can probably use (org-element-property :duration (org-element-at-point)) to extract last duration. Note that this issue is not similar to OP's issue, because CLOCK property, for whatever value it was supposed to contain, wouldn't have helped here. Regards, -- Nicolas Goaziou