emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Listing clock time in 'timeline' order
@ 2013-04-08  7:25 Giorgos Keramidas
  2013-04-09 11:56 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Giorgos Keramidas @ 2013-04-08  7:25 UTC (permalink / raw)
  To: emacs-orgmode

Hi everyone,

I've just started experimenting with clock-in / clock-out for multiple
tasks in an org-mode buffer, and this looks awesome for tracking where
time is spent, how much time was spent on each task, etc.

Being able to report with 'clocktable' the cummulative time spent on
each task is brilliant.

I also used the agenda 'timeline' in the past, especially with tasks
marked as TODO / NEXT.

Now it occured to me that using clock-in/out would be a nice way to
produce timesheet reports, e.g. something that would be able to take two
tasks with multiple clock entries like this:

  * TODO Reading book 'Prescription for Chaos'          :book:scifi:personal:
    CLOCK: [2013-04-07 Sun 17:10]--[2013-04-07 Sun 17:53] =>  0:43
    CLOCK: [2013-04-07 Sun 15:55]--[2013-04-07 Sun 16:08] =>  0:13
    CLOCK: [2013-04-07 Sun 13:58]--[2013-04-07 Sun 14:52] =>  0:54

  * Reading email                                       :personal:email:
    # freebsd-hackers
    CLOCK: [2013-04-07 Sun 23:29]--[2013-04-07 Sun 23:30] =>  0:00
    # emacs-devel
    CLOCK: [2013-04-07 Sun 23:27]--[2013-04-07 Sun 23:28] =>  0:01
    # mercurial-main
    CLOCK: [2013-04-07 Sun 23:26]--[2013-04-07 Sun 23:27] =>  0:01
    # freebsd-current
    CLOCK: [2013-04-07 Sun 23:17]--[2013-04-07 Sun 23:26] =>  0:09
    # freebsd-developers -- deleting old 2010-2012 emails and catching up
    # with unread mail queue.
    CLOCK: [2013-04-07 Sun 23:02]--[2013-04-07 Sun 23:16] =>  0:14
    # freebsd-announce
    CLOCK: [2013-04-07 Sun 23:01]--[2013-04-07 Sun 23:02] =>  0:01
    # freebsd-developers
    CLOCK: [2013-04-07 Sun 14:08]--[2013-04-07 Sun 14:32] =>  0:24
    # freebsd-questions
    CLOCK: [2013-04-07 Sun 14:06]--[2013-04-07 Sun 14:08] =>  0:02
    # emacs-devel
    CLOCK: [2013-04-07 Sun 14:04]--[2013-04-07 Sun 14:06] =>  0:02

and then produce something like clocktable, but with the clock entries
sorted by time instead of added together for each task:

  #+BEGIN: clocksheet :scope file :tgs "+personal"
  Clock timesheet at [2013-04-07 Sun 23:30]

  | Start                | Stop                 | Time | Headline                              |
  |----------------------+----------------------+------+---------------------------------------|
  | 2013-04-07 Sun 13:58 | 2013-04-07 Sun 14:52 | 0:54 | Reading book 'Prescription for Chaos' |
  | 2013-04-07 Sun 14:04 | 2013-04-07 Sun 14:06 | 0:02 | Reading email                         |
  | 2013-04-07 Sun 14:06 | 2013-04-07 Sun 14:08 | 0:02 | Reading email                         |
  | 2013-04-07 Sun 14:08 | 2013-04-07 Sun 14:32 | 0:24 | Reading email                         |
  | 2013-04-07 Sun 15:55 | 2013-04-07 Sun 16:08 | 0:13 | Reading book 'Prescription for Chaos' |
  | 2013-04-07 Sun 17:10 | 2013-04-07 Sun 17:53 | 0:43 | Reading book 'Prescription for Chaos' |
  | 2013-04-07 Sun 23:01 | 2013-04-07 Sun 23:02 | 0:01 | Reading email                         |
  | 2013-04-07 Sun 23:02 | 2013-04-07 Sun 23:16 | 0:14 | Reading email                         |
  | 2013-04-07 Sun 23:17 | 2013-04-07 Sun 23:26 | 0:09 | Reading email                         |
  | 2013-04-07 Sun 23:26 | 2013-04-07 Sun 23:27 | 0:01 | Reading email                         |
  | 2013-04-07 Sun 23:27 | 2013-04-07 Sun 23:28 | 0:01 | Reading email                         |
  | 2013-04-07 Sun 23:29 | 2013-04-07 Sun 23:30 | 0:01 | Reading email                         |
  |----------------------+----------------------+------+---------------------------------------|
  | Total time           |                      |      |                                       |
  #+END:

This would make org-mode an excellent tool e.g. for reporting time sheet
information for projects, even for billing time spent on a project.

Do you think such a feature is possible org-mode?  Does it already exist
in some form?  If not, I'm definitely willing to help implementing it.

- Giorgos

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

* Re: Listing clock time in 'timeline' order
  2013-04-08  7:25 Listing clock time in 'timeline' order Giorgos Keramidas
@ 2013-04-09 11:56 ` Bastien
  2013-04-09 14:14   ` Giorgos Keramidas
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2013-04-09 11:56 UTC (permalink / raw)
  To: Giorgos Keramidas; +Cc: emacs-orgmode

Hi Giorgos,

"Giorgos Keramidas" <keramida@ceid.upatras.gr> writes:

> Do you think such a feature is possible org-mode?  

It is not possible at the moment.

There is the option `org-clock-clocktable-formatter' that allows you
to define your own function for formatting clocktables, so in theory
you could scratch from there.

> Does it already exist in some form?  If not, I'm definitely willing
> to help implementing it.

I would first try to extend org-collector.el (from the contrib/
director) by allowing collections to be made from the :LOGBOOK: drawer
(instead of the :PROPERTIES: drawer).  Once you have this, it should
be quite straightforward to put all the clocks in a table as you
suggest.  But definitely have a look at org-collector.el, it's worth
inspecting.

HTH,

-- 
 Bastien

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

* Re: Listing clock time in 'timeline' order
  2013-04-09 11:56 ` Bastien
@ 2013-04-09 14:14   ` Giorgos Keramidas
  2013-04-09 14:16     ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Giorgos Keramidas @ 2013-04-09 14:14 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On 2013-04-09 13:56, Bastien <bzg@gnu.org> wrote:
> Hi Giorgos,
>
> "Giorgos Keramidas" <keramida@ceid.upatras.gr> writes:
>
> > Do you think such a feature is possible org-mode?
>
> It is not possible at the moment.
>
> There is the option `org-clock-clocktable-formatter' that allows you
> to define your own function for formatting clocktables, so in theory
> you could scratch from there.

That's a very good pointer. Thanks!

In the meantime I found that org-agenda includes a 'log-mode', which
reports an _almost_ perfect timesheet for what I wanted to do, e.g.:

Monday      8 April 2013 W15
  AGENDA:     10:45-10:59 Clocked:   (0:14) DONE Building FreeBSD world at ~kobe~ :laptop:personal:bsd:
  AGENDA:     10:45-12:15 Clocked:   (1:30) DONE Reading foo doc :work:doc:
  AGENDA:     11:01-14:04 Clocked:   (3:03) DONE Building FreeBSD world at ~kobe~ :laptop:personal:bsd:
  AGENDA:     12:40-14:11 Clocked:   (1:31) DONE Chapter 10 -- Chapter title :reading:
  AGENDA:     14:04-14:10 Clocked:   (0:06) DONE Installing new FreeBSD world at ~kobe~ :laptop:personal:bsd:
  AGENDA:     17:20-18:17 Clocked:   (0:57) DONE Chapter 10 -- Chapter title    :reading:
  AGENDA:     18:17-19:05 Clocked:   (0:48) DONE Chapter 11 -- Chapter title    :reading:
  AGENDA:     19:05-20:21 Clocked:   (1:16) DONE Chapter 12 -- Chapter title    :reading:
  AGENDA:     20:30-21:00 Clocked:   (0:30) DONE Chapter 13 -- Chapter title    :reading:
  AGENDA:     21:15-21:33 Clocked:   (0:18) DONE Chapter 13 -- Chapter title    :reading:
  AGENDA:     21:50-22:49 Clocked:   (0:59) DONE Chapter 14 -- Chapter title    :reading:

I think I can definitely adapt this, or use a custom version of
`org-clock-clocktable-formatter' to make it _perfect_.

The time-ordered output of the agenda, visible with `C-c a a l' is
already so close to what I wanted that the changes should be pretty
minimal.

Cheers,
Giorgos

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

* Re: Listing clock time in 'timeline' order
  2013-04-09 14:14   ` Giorgos Keramidas
@ 2013-04-09 14:16     ` Bastien
  0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2013-04-09 14:16 UTC (permalink / raw)
  To: Giorgos Keramidas; +Cc: emacs-orgmode

Giorgos Keramidas <keramida@ceid.upatras.gr> writes:

> The time-ordered output of the agenda, visible with `C-c a a l' is
> already so close to what I wanted that the changes should be pretty
> minimal.

Indeed!  I should have mentioned that first.

-- 
 Bastien

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

end of thread, other threads:[~2013-04-09 14:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-08  7:25 Listing clock time in 'timeline' order Giorgos Keramidas
2013-04-09 11:56 ` Bastien
2013-04-09 14:14   ` Giorgos Keramidas
2013-04-09 14:16     ` Bastien

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).