emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clock tables and two ways to categorize tasks


From: Tim Cross
Subject: Re: Clock tables and two ways to categorize tasks
Date: Sun, 22 Nov 2020 18:06:10 +1100
User-agent: mu4e 1.5.7; emacs 27.1.50

Kristian Grönberg <kristian@gronberg.org> writes:

>> On 20 Nov 2020, at 10:23, Leo Okawa Ericson <leo@relevant-information.com> 
>> wrote:
>>
>> 
>> Some time ago I hacked together a bunch of elisp to create a clock table
>> based on tags. [1] It uses org's dynamic block feature[2] to create a
>> piechart with gnuplot and a simple table that shows percentages of time
>> spent on different tags. I should say that it has basically no
>> documentation at all, but if there is interest I could write something
>> to explain the basic usage at least.
>>
>> [1] https://github.com/Zetagon/dotfiles/blob/master/doom/pichart-property.el
>>
>> [2] https://orgmode.org/manual/Dynamic-Blocks.html
>>
>
> Started to read through the code and yes, a bit more documentation would be 
> great.
>
> Thanks
>

The other thing to consider is writing your own clock table formatter.

The one which is the default in org is somewhat long and looks a bit
challenging. However, that is because of all the options it has to deal
with. If you just consider how it works and can accept a formatter which
does not support the whole range of clock table options - only the ones
you need, it is actually very simple. The data structure passed in by
the clocktable function is just a nested list where each row has the
basic details of the tasks selected by the scope e.g. level, headline
text, tags, timestamp, time and properties associated with the entry.
You can sort, filter and present the data in whatever manner you want.
Using something like pcase-dolist to destructure the data into variables
and it can be quite clean.

HTH

Tim
--
Tim Cross



reply via email to

[Prev in Thread] Current Thread [Next in Thread]