From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Dietsche Subject: Re: Date-centric Clocktable Date: Wed, 07 Sep 2011 15:54:34 +0200 Message-ID: <87obywcvad.fsf@rat.lan> References: <87zkip7oc6.fsf@gmail.com> <87mxegenfh.fsf@rat.lan> <87d3fcsoqf.fsf@gmail.com> <871uvsejxp.fsf@rat.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1IaQ-0000m6-6W for emacs-orgmode@gnu.org; Wed, 07 Sep 2011 09:54:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1IaO-00015a-Cz for emacs-orgmode@gnu.org; Wed, 07 Sep 2011 09:54:42 -0400 Received: from www85.your-server.de ([213.133.104.85]:38632) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1IaO-00014S-54 for emacs-orgmode@gnu.org; Wed, 07 Sep 2011 09:54:40 -0400 In-Reply-To: (Carsten Dominik's message of "Wed, 7 Sep 2011 12:28:22 +0200") 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: Carsten Dominik Cc: emacs-orgmode@gnu.org Carsten Dominik writes: > On Sep 7, 2011, at 12:16 PM, Olaf Dietsche wrote: > >> Rasmus writes: >> >>>> Why don't you just use a simple (perl/python/...) script to collect your >>>> data? Here's a quick hack in perl: >>> >>> That was my plan if I was not able to do from within Org. To me it would >>> be a lot faster than hacking something together in emacs-lisp, >>> unfortunately. >> >> If you insist on elisp, maybe something along these (untested) lines >> might work: >> >> ---8<--- cut here --- [snip] >> --- cut here --->8--- > > this is great! Thank you :-) > Maybe we should make this a little builtin function, > with a format specification to create the lines. > What is still missing, I think, is some sorting by time would. > Basically, use > > (org-float-time > (apply 'encode-time (save-match-data (org-parse-time-string (match-string 1))))) > > after the successful search for a clock string to get a floating > point number representing the starting time, collect the > line you are creating into an alist with the times and sort > them before inserting into the buffer. I don't know, wether adding small special purpose functions adds real value, since we already have "org-map-entries". Maybe adding generic functions to org or showing lisp snippets at worg would be more useful. Regards, Olaf