From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mattia Pascal Subject: Re: compute the difference between effort estimates and actual clocked time Date: Tue, 16 Aug 2011 23:04:02 +0200 Message-ID: References: <87obzpo0o1.fsf@altern.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtQnu-0008Hr-98 for emacs-orgmode@gnu.org; Tue, 16 Aug 2011 17:04:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QtQnt-0004SU-8j for emacs-orgmode@gnu.org; Tue, 16 Aug 2011 17:04:06 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:40690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtQns-0004S6-Va for emacs-orgmode@gnu.org; Tue, 16 Aug 2011 17:04:05 -0400 Received: by bkbzt4 with SMTP id zt4so285485bkb.0 for ; Tue, 16 Aug 2011 14:04:03 -0700 (PDT) In-Reply-To: <87obzpo0o1.fsf@altern.org> 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: Bastien Cc: emacs-orgmode@gnu.org Thanks a lot. It's what I needed. I'll work on it. On Tue, Aug 16, 2011 at 4:25 PM, Bastien wrote: > Hi Pascal, > > M.P. writes: > >> I'd like to add to my tasks a property =A0whose value should be the diff= erence in >> time between the effort estimates and the actual clocked time. The final= purpose >> is to use the property in column view mode as I do with CLOCKSUM and Eff= ort. >> Could you give me any hints? > > There is no way to do this easily right now. > > However, this command will display the remaining effort: > > #+begin_src emacs-lisp > (defun my-org-display-remaining-effort () > =A0"Compute remaining effort for current subtree." > =A0(interactive) > =A0(let ((clocksum (org-clock-sum-current-item)) > =A0 =A0 =A0 =A0(effort (org-duration-string-to-minutes > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(org-entry-get (point) "Effort")))) > =A0 =A0(message (org-minutes-to-hh:mm-string (- effort clocksum))))) > #+end_src > > Also, the attached patch allow to postprocess property values with > custom functions when inserting them with org-set-properties. > > Let me know if you find this useful! > > Best, > > > > -- > =A0Bastien > >