Org-mode mailing list
 help / color / mirror / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Clock tables and two ways to categorize tasks
Date: Sun, 22 Nov 2020 18:06:10 +1100
Message-ID: <871rglq3a5.fsf@gmail.com> (raw)
In-Reply-To: <42BB991F-A000-4BB0-8040-27C4810F7C40@gronberg.org>


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	other threads:[~2020-11-22  7:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 12:25 Marcin Borkowski
2020-11-19 14:47 ` Mikhail Skorzhisnkii
2020-11-19 14:52 ` Tim Cross
2020-11-20  8:20 ` Leo Okawa Ericson
2020-11-22  5:55   ` Kristian Grönberg
2020-11-22  7:06     ` Tim Cross [this message]
2020-11-22 18:16     ` Jean Louis
2020-11-22 21:28       ` Marcin Borkowski
2020-11-22 22:11         ` Jean Louis
2020-11-20  0:37 Bala Ramadurai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://orgmode.org

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871rglq3a5.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git