From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Marcin Borkowski <mbork@mbork.pl>
Cc: emacs-orgmode@gnu.org, Martin Kaffanke <martin@kaffanke.at>
Subject: Re: (org-entry-get (point) "CLOCK") fails now
Date: Sun, 30 Aug 2015 17:21:51 +0200 [thread overview]
Message-ID: <87mvx83ipc.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87si71lycn.fsf@mbork.pl> (Marcin Borkowski's message of "Sun, 30 Aug 2015 15:06:32 +0200")
Hello,
Marcin Borkowski <mbork@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
next prev parent reply other threads:[~2015-08-30 15:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-30 11:41 (org-entry-get (point) "CLOCK") fails now Martin Kaffanke
2015-08-30 12:25 ` Nicolas Goaziou
2015-08-30 13:06 ` Marcin Borkowski
2015-08-30 15:21 ` Nicolas Goaziou [this message]
2015-08-30 20:18 ` Marcin Borkowski
2015-08-30 15:37 ` Martin Kaffanke
2015-08-30 18:59 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mvx83ipc.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=martin@kaffanke.at \
--cc=mbork@mbork.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).