From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: lisp/org-clock.el: Add param :properties to list properties in clocktable Date: Sun, 27 Mar 2011 08:13:49 -0400 Message-ID: <87ipv4rcaq.fsf@norang.ca> References: <874o6pocat.fsf@gmail.com> <87y641ehep.fsf@norang.ca> <87bp0w6fca.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=36259 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q3oqw-0006vI-6l for emacs-orgmode@gnu.org; Sun, 27 Mar 2011 08:13:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q3oqu-0002fB-Th for emacs-orgmode@gnu.org; Sun, 27 Mar 2011 08:13:54 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:33718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q3oqu-0002f3-QJ for emacs-orgmode@gnu.org; Sun, 27 Mar 2011 08:13:52 -0400 In-Reply-To: <87bp0w6fca.fsf@gmail.com> (Niels Giesen's message of "Sun, 27 Mar 2011 12:13:41 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Niels Giesen Cc: emacs-orgmode@gnu.org Niels Giesen writes: > Bernt Hansen writes: > > [...] > >> Could you provide a sample clock report using this patch to get a >> better idea of why you find this useful? > > Yes, here you are, along with the contents of a sample file, so that you > may get a gist of my need for inheritance. > > * Clocktables > #+BEGIN: clocktable :maxlevel 2 :scope file :properties ("Costcenter" "Billable") :inherit-props t > Clock summary at [2011-03-27 Sun 12:04] > > | Costcenter | Billable | Headline | Time | | > |-----------------------------------+----------+---------------------------------+--------+------| > | | | *Total time* | *3:08* | | > |-----------------------------------+----------+---------------------------------+--------+------| > | A-102: General Administration | | TODO Travel cost declaration | 0:42 | | > | A-102: General Administration | | TODO December 2007-2009 | | 0:37 | > | O-100: General overhead | | Making coffee for the lot of us | 0:06 | | > | C-100: Customer relations general | | Helpdesk | 1:10 | | > | C-100: Customer relations general | | Categorize our helpdesk e-mails | | 0:20 | > | C-101: Customer A | [X] | Help out customer a | | 0:10 | > | C-102: Customer B | [?] | Help out customer b on issue x | | 0:20 | > | C-100: Customer relations general | | Help out potential customer c | | 0:20 | > | W-100: Web Development | | Develop our main web app | 1:10 | | > | W-100: Web Development | | that | | 0:41 | > | C-102: Customer B | [?] | something only customer b wants | | 0:29 | > #+END: > > Actually, my boss needs something more like the table below, which I > can export to something that Outlook Times also spits out (some > clocking plugin for MS Outlook that the rest of us uses, and I was > supposed to use too, you may understand that that is just a silly idea > for someone used to org-mode). > > Patches 1 and 3 allowed me to get this specific output using a custom > formatter and a #+TBLFM: line, which I may post to Worg if people are > interested. > > #+BEGIN: clocktable :formatter org-clocktable-write-outlook-times-style :maxlevel 2 :scope file :inherit-props t :properties ("Costcenter" "Billable") :date t :block day > Clock summary at [2011-03-27 Sun 12:04], for Sunday, March 27, 2011. > > | Date | Headline | Time | Costcenter | Billable | > |------------+-----------------------------------------------------------+--------+-----------------------------------+----------| > | | *Total time* | *3.05* | | | > |------------+-----------------------------------------------------------+--------+-----------------------------------+----------| > | 27-03-2011 | TODO Travel cost declaration | 0.00 | A-102: General Administration | | > | 27-03-2011 | TODO Travel cost declaration, TODO December 2007-2009 | 0.62 | A-102: General Administration | | > |------------+-----------------------------------------------------------+--------+-----------------------------------+----------| > | 27-03-2011 | Making coffee for the lot of us | 0.10 | O-100: General overhead | | > |------------+-----------------------------------------------------------+--------+-----------------------------------+----------| > | 27-03-2011 | Helpdesk | 0.00 | C-100: Customer relations general | | > | 27-03-2011 | Helpdesk, Categorize our helpdesk e-mails | 0.33 | C-100: Customer relations general | | > | 27-03-2011 | Helpdesk, Help out customer a | 0.17 | C-101: Customer A | [X] | > | 27-03-2011 | Helpdesk, Help out customer b on issue x | 0.33 | C-102: Customer B | [?] | > | 27-03-2011 | Helpdesk, Help out potential customer c | 0.33 | C-100: Customer relations general | | > |------------+-----------------------------------------------------------+--------+-----------------------------------+----------| > | 27-03-2011 | Develop our main web app | 0.00 | W-100: Web Development | | > | 27-03-2011 | Develop our main web app, that | 0.68 | W-100: Web Development | | > | 27-03-2011 | Develop our main web app, something only customer b wants | 0.48 | C-102: Customer B | [?] | > #+TBLFM: $2='(if (string= "$0" "@-I") "$0" (concat "@-I" ", " "$0"));L::$4='(if (string= "$0" "") "@-I" "$0");L > #+END: > * TODO Travel cost declaration > DEADLINE: <2011-04-01 vr .+1m> > - State "DONE" from "TESTING" [2011-02-01 di 10:02] > :LOGBOOK: > CLOCK: [2011-03-02 wo 09:17]--[2011-03-02 wo 09:22] => 0:05 > :END: > - State "DONE" from "TESTING" [2011-01-04 di 09:40] > :PROPERTIES: > :COSTCENTER: A-102: General Administration > :END: > ** TODO December 2007-2009 > :CLOCK: > CLOCK: [2011-03-27 Sun 09:28]--[2011-03-27 Sun 10:05] => 0:37 > :END: > Find out what were my costs during this hazy period of my life. Hi Niels, Thanks for the example. That helps a lot. I think posting this to Worg would be very useful. Thanks for sharing this! Regards, -- Bernt