emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Clock tables and two ways to categorize tasks
@ 2020-11-19 12:25 Marcin Borkowski
  2020-11-19 14:47 ` Mikhail Skorzhisnkii
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Marcin Borkowski @ 2020-11-19 12:25 UTC (permalink / raw)
  To: Org-Mode mailing list

Hi all,

here's the problem I'd like to solve.  I clock various tasks, and then
generate a clock table.  So far, so good.  But now I'd like to know
better where my time goes.  Most tasks I do have a few similar
components: discussion/research, writing code, testing, etc.  I thought
that I could create subheadlines under each of the tasks and give them
tags like :discuss:, :code:, :test:, :debug: and so on.  (Not very
convenient, but doable, maybe with a bit of Elisp to automate the
process.)

Now, I'd like to prepare two clock tables: one where I see how much time
every task took, and one where I can see how much time I spent coding,
testing, debugging, emailing etc.  I can see in the docs that there is
the ~:match~ option, but if I understand it correctly, it can only
restrict the table to /one/ tag, so I'd need to have as many tables as
I have tags - not optimal.

Any ideas?  Should I use something else than tags for that?

TIA,

--
Marcin Borkowski
http://mbork.pl


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Clock tables and two ways to categorize tasks
  2020-11-19 12:25 Clock tables and two ways to categorize tasks Marcin Borkowski
@ 2020-11-19 14:47 ` Mikhail Skorzhisnkii
  2020-11-19 14:52 ` Tim Cross
  2020-11-20  8:20 ` Leo Okawa Ericson
  2 siblings, 0 replies; 10+ messages in thread
From: Mikhail Skorzhisnkii @ 2020-11-19 14:47 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: emacs-orgmode

Hi Marcin,

I tried to solve this issue for myself. My first attempt to solve 
it was to understand which tags are interesting and then make a 
template with as many tables as there were interesting tag 
combinations. But then I faced another problem: sometimes I am 
using different set of tags and templates don't work as good as 
they could.

To mitigate that problem, I've tried different approach. I made a 
small package that generates me reports for past week or past 
month. It's working for me, but there are a lot of rough edges 
around it. Basically it collects headers with clocks, copies them 
to separate file, rearrange them and generate clock tables. You 
can try it here:

  https://github.com/mskorzhinskiy/org-ir

Another way would be to write your own clock table sorter. See 
this post on reddit:

  https://www.reddit.com/r/emacs/comments/jp5ear/sorting_org_clocktables_by_category_instead_of/

And just for future references, in case Reddit someday will go 
down:

  Code from /u/jp5ear: 
  https://gist.github.com/blockynight/5eebe8323b68e02f436c0440320dc926
  Org-mode manual: https://orgmode.org/manual/The-clock-table.html 
  (see :formatter parameter)

Mikhail Skorzhinskii

Marcin Borkowski <mbork@mbork.pl> writes:

> Hi all,
>
> here's the problem I'd like to solve.  I clock various tasks, 
> and then
> generate a clock table.  So far, so good.  But now I'd like to 
> know
> better where my time goes.  Most tasks I do have a few similar
> components: discussion/research, writing code, testing, etc.  I 
> thought
> that I could create subheadlines under each of the tasks and 
> give them
> tags like :discuss:, :code:, :test:, :debug: and so on.  (Not 
> very
> convenient, but doable, maybe with a bit of Elisp to automate 
> the
> process.)
>
> Now, I'd like to prepare two clock tables: one where I see how 
> much time
> every task took, and one where I can see how much time I spent 
> coding,
> testing, debugging, emailing etc.  I can see in the docs that 
> there is
> the ~:match~ option, but if I understand it correctly, it can 
> only
> restrict the table to /one/ tag, so I'd need to have as many 
> tables as
> I have tags - not optimal.
>
> Any ideas?  Should I use something else than tags for that?
>
> TIA,


--
---
Mikhail Skorzhinskii


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Clock tables and two ways to categorize tasks
  2020-11-19 12:25 Clock tables and two ways to categorize tasks Marcin Borkowski
  2020-11-19 14:47 ` Mikhail Skorzhisnkii
@ 2020-11-19 14:52 ` Tim Cross
  2020-11-20  8:20 ` Leo Okawa Ericson
  2 siblings, 0 replies; 10+ messages in thread
From: Tim Cross @ 2020-11-19 14:52 UTC (permalink / raw)
  To: emacs-orgmode


Marcin Borkowski <mbork@mbork.pl> writes:

> Hi all,
>
> here's the problem I'd like to solve.  I clock various tasks, and then
> generate a clock table.  So far, so good.  But now I'd like to know
> better where my time goes.  Most tasks I do have a few similar
> components: discussion/research, writing code, testing, etc.  I thought
> that I could create subheadlines under each of the tasks and give them
> tags like :discuss:, :code:, :test:, :debug: and so on.  (Not very
> convenient, but doable, maybe with a bit of Elisp to automate the
> process.)
>
> Now, I'd like to prepare two clock tables: one where I see how much time
> every task took, and one where I can see how much time I spent coding,
> testing, debugging, emailing etc.  I can see in the docs that there is
> the ~:match~ option, but if I understand it correctly, it can only
> restrict the table to /one/ tag, so I'd need to have as many tables as
> I have tags - not optimal.
>
> Any ideas?  Should I use something else than tags for that?
>

Although I haven't tried it, I think you can have multiple tags. You
should be able to do something like

+TEST+DEBUG-DISCUSS

which would give you those tasks with tags :TEST: and :DEBUG: but not
:DISCUSS:

Have a look at the 'Matching tags and properties" section in the manual
(under the agenda section).

Another approach (actually the one I use) is to put things at different
levels. So at level 1 is the Tasks heading, at level 2 is each TODO at
level 3 is each subtask and at level 4 are the task activities (****
Research, **** Code, **** Meetings, **** Testing, **** Documentation).

My main clock table has :maxlevel 4, which shows a complete breakdown
while the table I use for invoicing (where I only want to show total
time, main task time and sub-task times, but not the level 4 stuff) has
:maxlevel 3.

Actually, I lie a bit. My current invoicing approach actually uses a
custom :formatter function so that my invoice clock table has columns
for rate, amount and total amount. However, the :maxlevel approach was
where I started!

--
Tim Cross


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Clock tables and two ways to categorize tasks
@ 2020-11-20  0:37 Bala Ramadurai
  0 siblings, 0 replies; 10+ messages in thread
From: Bala Ramadurai @ 2020-11-20  0:37 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 304 bytes --]

Hello,
  Thank you for the patch from reddit and gist on categorizing tasks in the
clocktable.

Is there a way, the :formula % will also work on the *Category Time*, that
will be really handy in trying to find out category based time clocking?

Thanks and have a nice day!
Bala
https://balaramadurai.net

[-- Attachment #2: Type: text/html, Size: 534 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Clock tables and two ways to categorize tasks
  2020-11-19 12:25 Clock tables and two ways to categorize tasks 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
  2 siblings, 1 reply; 10+ messages in thread
From: Leo Okawa Ericson @ 2020-11-20  8:20 UTC (permalink / raw)
  To: Marcin Borkowski, Org-Mode mailing list


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



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Clock tables and two ways to categorize tasks
  2020-11-20  8:20 ` Leo Okawa Ericson
@ 2020-11-22  5:55   ` Kristian Grönberg
  2020-11-22  7:06     ` Tim Cross
  2020-11-22 18:16     ` Jean Louis
  0 siblings, 2 replies; 10+ messages in thread
From: Kristian Grönberg @ 2020-11-22  5:55 UTC (permalink / raw)
  To: Org-Mode Emacs


> 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

/Kristian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Clock tables and two ways to categorize tasks
  2020-11-22  5:55   ` Kristian Grönberg
@ 2020-11-22  7:06     ` Tim Cross
  2020-11-22 18:16     ` Jean Louis
  1 sibling, 0 replies; 10+ messages in thread
From: Tim Cross @ 2020-11-22  7:06 UTC (permalink / raw)
  To: emacs-orgmode


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Clock tables and two ways to categorize tasks
  2020-11-22  5:55   ` Kristian Grönberg
  2020-11-22  7:06     ` Tim Cross
@ 2020-11-22 18:16     ` Jean Louis
  2020-11-22 21:28       ` Marcin Borkowski
  1 sibling, 1 reply; 10+ messages in thread
From: Jean Louis @ 2020-11-22 18:16 UTC (permalink / raw)
  To: Kristian Grönberg; +Cc: Org-Mode Emacs

* Kristian Grönberg <kristian@gronberg.org> [2020-11-22 08:56]:
> 
> > 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

I am sorry what is clock table?

I found only this one: https://tinyurl.com/y2jomwqr

Or do you mean clock-in and clock-out like tracking how much time was
spent on specific task? For me that would be attention slurp, it means
I would need to put attention to do the action clock-in and clock-out
or clock-start and clock-stop. Maybe because I cannot relate my work
to tracking time I do not use it.

I am human not computer. Humans put attention on important things like
writing and not on when writing began exactly and when did it stop
exactly. Self-observation is fine in general and I recommend it, but
for repetitiv stuff computers should be counting it for us.

Instead of that current feature, which I would rather call
anti-feature, what is really better is to simply designate subtree
that such subtree wants to get tracked for work. When user enters the
subtree and moves with cursor or writes anything or have it on screen
then it should automatically start the clock and end the clock. And
such statistic would be 100% of time wrong as user would need to make
a break like to go to bathroom or eat and would forget to stop the
clock. 

And if it tracks something else but work within the text file, like
tracking how long time it takes to change a tyre then such tracking
better be done by using something like Stoppuhr or stopwatch. To me
that piece of time tracking information seem counter-productive anyway
unless there is some race going on.

I know that many people get paid by their time but not that I agree to
that, I like paying for services done, products but not for time
spent and also do not charge people by my time spent for their
benefit. As time in itself does not give anything useful unless I put
something useful inside.

Those useful objects should be tracked and counted, something like how
many breads have been produced, or how many phones have been sold or
manufactured, how many clients have been served.

From viewpoint of non-time tracker such time tracking would make me
lazy and frantic about stopping and starting time and there would be
no way to exclude human errors so statistic would be wrong 100% of
time.

I am tracking real things, like emails sent as that number of email
sent influences sales, then leads coming to database as influencing
number of leads to subscribe to information increases sales, products
sold, money in, something like that. Time tracking would be last for
me.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Clock tables and two ways to categorize tasks
  2020-11-22 18:16     ` Jean Louis
@ 2020-11-22 21:28       ` Marcin Borkowski
  2020-11-22 22:11         ` Jean Louis
  0 siblings, 1 reply; 10+ messages in thread
From: Marcin Borkowski @ 2020-11-22 21:28 UTC (permalink / raw)
  To: Jean Louis; +Cc: Org-Mode Emacs, Kristian Grönberg


On 2020-11-22, at 19:16, Jean Louis <bugs@gnu.support> wrote:

> * Kristian Grönberg <kristian@gronberg.org> [2020-11-22 08:56]:
>>
>> > 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
>
> I am sorry what is clock table?
>
> [snip]

Well, and how is all that helpful at all?

Of course, in an ideal world we'd be paid for the results, not for the
time.  But:

1. Welcome to the reality, this is not an ideal world.  I am being paid
for my time.  (And sometimes we really do not have a better option.  How
would you calculate a teacher's wage?)

2. Clocking in and out is the question of habit.  It does not really
take up a significant portion of my attention, especially with Ivy and
org-mru.  I've been doing it for years, and while I do sometimes forget
about it, an occasional error does not make the whole data useless.

3. Knowing where my time goes is the first step in optimizing it.

Best,

--
Marcin Borkowski
http://mbork.pl


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Clock tables and two ways to categorize tasks
  2020-11-22 21:28       ` Marcin Borkowski
@ 2020-11-22 22:11         ` Jean Louis
  0 siblings, 0 replies; 10+ messages in thread
From: Jean Louis @ 2020-11-22 22:11 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Org-Mode Emacs, Kristian Grönberg

* Marcin Borkowski <mbork@mbork.pl> [2020-11-23 00:28]:
> Of course, in an ideal world we'd be paid for the results, not for the
> time.  But:
> 
> 1. Welcome to the reality, this is not an ideal world.  I am being paid
> for my time.  (And sometimes we really do not have a better option.  How
> would you calculate a teacher's wage?)

Yes sure. In that time many valuable things take place. But time is
more or less fixed per week or per month and is never as accurate.

Do you track that time of work with Emacs?

> 2. Clocking in and out is the question of habit.  It does not really
> take up a significant portion of my attention, especially with Ivy and
> org-mru.  I've been doing it for years, and while I do sometimes forget
> about it, an occasional error does not make the whole data useless.

> 3. Knowing where my time goes is the first step in optimizing it.

OK so you observe when doing task A how long time you spend in task A,
so that after 100 tasks you can find out where you spent most of time.

The tasks I create are normally delegated to others on distance and I
could not possible see what they do and how, if they really work or
not so time tracking would be inaccurate statistics. By observation is
found where most time is spent for nothing (useless dwelling).


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-11-23  7:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-19 12:25 Clock tables and two ways to categorize tasks 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
2020-11-22 18:16     ` Jean Louis
2020-11-22 21:28       ` Marcin Borkowski
2020-11-22 22:11         ` Jean Louis
  -- strict thread matches above, loose matches on Subject: below --
2020-11-20  0:37 Bala Ramadurai

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).