all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@mbork.pl>
To: Martin Kaffanke <martin@kaffanke.at>, emacs-orgmode@gnu.org
Subject: Re: (org-entry-get (point) "CLOCK") fails now
Date: Sun, 30 Aug 2015 15:06:32 +0200	[thread overview]
Message-ID: <87si71lycn.fsf@mbork.pl> (raw)
In-Reply-To: <87r3ml2ca9.fsf@nicolasgoaziou.fr>


On 2015-08-30, at 14:25, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

> Hello,
>
> Martin Kaffanke <martin@kaffanke.at> writes:
>
>> Why is "CLOCK" property now missing (after elpa updates) in
>> org-entry-get?
>
> I removed it because it was not used in the code base, and the stored
> value was dubious anyway, i.e., the first CLOCK keyword in the entry,
> which could also be the first chronologically, or the last one, or
> anything between since there is no rule about the order of CLOCK
> keywords in an entry.
>
>> And how do I have to rewrite my code now?
>
> I don't have enough information to answer. 
>
> What is your code supposed to do? What did you use CLOCK property for?

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?)

> Regards,

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

  reply	other threads:[~2015-08-30 13:06 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 [this message]
2015-08-30 15:21     ` Nicolas Goaziou
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87si71lycn.fsf@mbork.pl \
    --to=mbork@mbork.pl \
    --cc=emacs-orgmode@gnu.org \
    --cc=martin@kaffanke.at \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.