From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AKvBJAkOul9qGAAA0tVLHw (envelope-from ) for ; Sun, 22 Nov 2020 07:06:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SBmcIAkOul9wLAAAB5/wlQ (envelope-from ) for ; Sun, 22 Nov 2020 07:06:49 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A050594043B for ; Sun, 22 Nov 2020 07:06:48 +0000 (UTC) Received: from localhost ([::1]:33672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgjSP-0007AB-Tr for larch@yhetil.org; Sun, 22 Nov 2020 02:06:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgjS0-00078m-I8 for emacs-orgmode@gnu.org; Sun, 22 Nov 2020 02:06:20 -0500 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]:34653) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kgjRx-0000M4-L1 for emacs-orgmode@gnu.org; Sun, 22 Nov 2020 02:06:20 -0500 Received: by mail-pg1-x536.google.com with SMTP id l17so821419pgk.1 for ; Sat, 21 Nov 2020 23:06:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:in-reply-to:message-id:date :mime-version:content-transfer-encoding; bh=FkUDuvnWE622VNy//eBBCWb//LuZibx3RDbCIaNhkDE=; b=liDJBSIWj6FrfiYJWivxgIoZMkh03z/jFaO7uAWBiDHRNJZGTb+1YaZqni3g85wzX7 JlDl/vxVP+v5hZoxhhY/8ByXB635ZQLCbpBzjCEWBLzVYnY4kccsHq2i+8TUpHJt8ABV btgYXToMXOoZRBCU7+wVcF19RT7TyzHGDaBt8fhV4/rqQNV2lz+mx7m7+pN3qEQ+uzW4 Ls+dsh0rdYp0ZZHRkEUz8E6gRRXHCdDaIBtKXBIAFO4MI7uNXMDAosbgdaQSuewny48Y uZtXmXJLxjdy7L27x1JZ2y4O2H9CGC0D4YdMbidzku3KjhI1bKNqN8ZV0dL2sgHeP7Ky lyEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject :in-reply-to:message-id:date:mime-version:content-transfer-encoding; bh=FkUDuvnWE622VNy//eBBCWb//LuZibx3RDbCIaNhkDE=; b=mwvZkeo+aC3jT+V4Yatrwp2h+oQZIEzl5xkwIjUBMfPSl6KXb0eDau66vTPQ1tcBlI Wr1DkvuRRdDAcOd2VAlc5d5xNA7cJstYi8PRdtlAxgdyeiE+E0aCtw/zYeBB6JKK+XjH Jfo1IFKcItj4pbORkx07DplQvGkmRZ5YUZGEt2QO77u5mAHX6XUN487E3e4L7VF0fxYF iJA5t1nZz+e8OTqownPFVj4O97x8r0pRW3GFyY6P07b1bVVEg1+bO5biG1j23D/JpH2j Vnx/FTuL2J802BvbFwz1xbbnQlwupS8pHPaQrnEV9/X9hMDne0HN8GH7C2YSkq/QOTnp fbgA== X-Gm-Message-State: AOAM533MmQP/mKzszwpetinS+B7RNEixgFvlSFjQPy7nanIb7BV0ByNU G0uX25dj28ekBa2SzzKFAfKT/8/F9RU7Kw== X-Google-Smtp-Source: ABdhPJzf+bFC60UPJ0lr/oKfQA5s+irVukBfA0KRf74ouhZHuxSRPozGgHBPZnpDF2TqoSqKk2eK3Q== X-Received: by 2002:a17:90a:9f8c:: with SMTP id o12mr18687993pjp.79.1606028775856; Sat, 21 Nov 2020 23:06:15 -0800 (PST) Received: from tim-desktop (106-69-108-175.dyn.iinet.net.au. [106.69.108.175]) by smtp.gmail.com with ESMTPSA id u24sm8865402pfm.81.2020.11.21.23.06.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Nov 2020 23:06:14 -0800 (PST) References: <87h7pksalo.fsf@leo-B85-HD3.i-did-not-set--mail-host-address--so-tickle-me> <42BB991F-A000-4BB0-8040-27C4810F7C40@gronberg.org> User-agent: mu4e 1.5.7; emacs 27.1.50 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: Clock tables and two ways to categorize tasks In-reply-to: <42BB991F-A000-4BB0-8040-27C4810F7C40@gronberg.org> Message-ID: <871rglq3a5.fsf@gmail.com> Date: Sun, 22 Nov 2020 18:06:10 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=theophilusx@gmail.com; helo=mail-pg1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=liDJBSIW; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: H8PMUyEXkxDF Kristian Gr=C3=B6nberg writes: >> On 20 Nov 2020, at 10:23, Leo Okawa Ericson wrote: >> >> =EF=BB=BF >> 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-propert= y.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