From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shakthi Kannan Subject: Obtain CLOCK duration from LOGBOOK drawer using Org Element Date: Fri, 24 Mar 2017 00:47:35 +0530 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cr8Er-0004r2-Kx for emacs-orgmode@gnu.org; Thu, 23 Mar 2017 15:17:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cr8Eq-0004f6-Ld for emacs-orgmode@gnu.org; Thu, 23 Mar 2017 15:17:37 -0400 Received: from mail-qk0-x22b.google.com ([2607:f8b0:400d:c09::22b]:35784) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cr8Eq-0004ew-Hd for emacs-orgmode@gnu.org; Thu, 23 Mar 2017 15:17:36 -0400 Received: by mail-qk0-x22b.google.com with SMTP id v127so189266360qkb.2 for ; Thu, 23 Mar 2017 12:17:36 -0700 (PDT) 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" To: emacs-orgmode@gnu.org Hi, How can I obtain the clocked time for each CLOCK entry in the LOGBOOK drawer using Org Element? Consider the following Org example: === Org sample === * DONE Task A CLOSED: [2017-03-20 Mon 12:21] :PROPERTIES: :ESTIMATED: 1.5 :ACTUAL: :OWNER: foo :END: :LOGBOOK: CLOCK: [2017-03-20 Mon 11:45]--[2017-03-20 Mon 12:15] => 0:30 CLOCK: [2017-03-17 Fri 20:15]--[2017-03-17 Fri 21:45] => 1:30 CLOCK: [2017-03-17 Fri 12:05]--[2017-03-17 Fri 13:05] => 1:00 :END: === END === I would like to obtain "0:30", "1:30" and "1:00" from the LOGBOOK CLOCK entries, sum them up and update the :ACTUAL: value in the the PROPERTIES drawer. How can this be done? Appreciate your inputs in this regard. Thanks! SK -- Shakthi Kannan http://www.shakthimaan.com