emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] (org-entry-get (point) "CLOCK") fails now


From: Nicolas Goaziou
Subject: Re: [O] (org-entry-get (point) "CLOCK") fails now
Date: Sun, 30 Aug 2015 17:21:51 +0200

Hello,

Marcin Borkowski <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]