From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: Re: (org-entry-get (point) "CLOCK") fails now Date: Sun, 30 Aug 2015 15:06:32 +0200 Message-ID: <87si71lycn.fsf@mbork.pl> References: <87io7xc8au.fsf@kaffanke.at> <87r3ml2ca9.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZW2Jo-0000Ka-Bb for emacs-orgmode@gnu.org; Sun, 30 Aug 2015 09:06:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZW2Jl-0001pY-62 for emacs-orgmode@gnu.org; Sun, 30 Aug 2015 09:06:44 -0400 Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:35961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZW2Jk-0001pO-Ua for emacs-orgmode@gnu.org; Sun, 30 Aug 2015 09:06:41 -0400 In-reply-to: <87r3ml2ca9.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Martin Kaffanke , emacs-orgmode@gnu.org On 2015-08-30, at 14:25, Nicolas Goaziou wrote: > Hello, > > Martin Kaffanke 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