emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Avdi Grimm <avdi@avdi.org>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Timeclock workflow?
Date: Fri, 25 Apr 2008 13:35:23 -0400	[thread overview]
Message-ID: <87abjhzvl0.fsf@gollum.intra.norang.ca> (raw)
In-Reply-To: <ecbcf0fb0804250938q581a5e11k2b74cf8eb2acf30f@mail.gmail.com> (Avdi Grimm's message of "Fri\, 25 Apr 2008 12\:38\:50 -0400")

"Avdi Grimm" <avdi@avdi.org> writes:

> Hi folks,

Hi :)
>
> I keep wanting to use timeclock along with org-mode, both to help with
> my time reporting for work, and because I think the resulting
> statistics might be interesting.  However, whenever I start to use it,
> two things tend to happen: 1) I'll clock-in, and then forget to clock
> out, and wind up with hours on the clock for a ten minute task; and 2)
> I'll simply forget to clock in.

I think that's just a habit you form.  If the clock is running it's
pretty obvious in the modeline.  With the default setting

(setq org-clock-out-when-done t)

the clock stops as soon as you change the status of the task to a DONE
state.  When you're done you should try to get in the habit of marking
the task as DONE or clocking out.

>
> Now, both of these can be remedied by manually editing
> clock-in/clock-out times, and org-mode makes this fairly easy.  But
> I'm wondering if anyone else has this problem, and if you've come up
> with any solutions.  Lately I've been thinking it might be nice to
> have a retroactive timeclock command which would let me say "I've been
> working on task X for the last half-hour", and it would automatically
> enter the clock-in/clock-out times.  Even better, it would truncate
> the clock-out time of any other task that overlapped.
>
> What do you all think?
>

Moving 'back in time' (ie you started something 5 minutes ago) I would
clock in the task, use org-clock-goto to get to the clock line and edit
the time back 5 minutes and let it continue normally.  It'll calculate
the total minutes when you clock out based on your new start time.  The
number of minutes in the modeline will be wrong but I can live with
that.

I don't think automatic editing and truncating of other task's timeclock
data is a good idea in general.  If you enter some wrong time it'll blow
away good clock times and restoring those is painful / impossible.

------------------------------------------------------------------------

I normally run a simple script to look at my clock times for the day to
identify holes and broken clock lines (start times with no stop time
etc). Sometimes when you org-clock-in with a running clock it can't find
the clock line (because you reorganized your file and moved the task
somewhere else) so it leaves that line open.

ts helps me find those cases so they don't get completely lost in my
time reports.

,----[ ts ]
| #!/bin/sh
| 
| # Default to today if no date is specified
| DATE="$1"
| if [ "$DATE" == "" ]
| then
|         DATE=$(date +'%Y-%m-%d %a')
| fi
| 
| grep -h "CLOCK.*$DATE" ~/git/org/*.org|sed 's/^[ \t]*//'|sort
`----

$ts gives me output for today by default


,---- [ ts output ]
| $ ts
| CLOCK: [2008-04-25 Fri 08:05]--[2008-04-25 Fri 08:20] =>  0:15
| CLOCK: [2008-04-25 Fri 10:10]--[2008-04-25 Fri 10:11] =>  0:01
| CLOCK: [2008-04-25 Fri 10:11]--[2008-04-25 Fri 10:12] =>  0:01
| CLOCK: [2008-04-25 Fri 10:17]--[2008-04-25 Fri 10:18] =>  0:01
| CLOCK: [2008-04-25 Fri 10:23]--[2008-04-25 Fri 10:27] =>  0:04
| CLOCK: [2008-04-25 Fri 10:27]--[2008-04-25 Fri 10:31] =>  0:04
| CLOCK: [2008-04-25 Fri 10:31]--[2008-04-25 Fri 10:36] =>  0:05
| CLOCK: [2008-04-25 Fri 10:41]--[2008-04-25 Fri 10:44] =>  0:03
| CLOCK: [2008-04-25 Fri 10:44]--[2008-04-25 Fri 10:45] =>  0:01
| CLOCK: [2008-04-25 Fri 10:48]--[2008-04-25 Fri 10:53] =>  0:05
| CLOCK: [2008-04-25 Fri 10:59]--[2008-04-25 Fri 12:27] =>  1:28
| CLOCK: [2008-04-25 Fri 12:28]--[2008-04-25 Fri 12:29] =>  0:01
| CLOCK: [2008-04-25 Fri 12:32]--[2008-04-25 Fri 12:48] =>  0:16
| $
`----

$ ts 2008-04

will give me output for all of April 2008 which I find useful to check
the clock data before I do my monthly timeclock reports.

-Bernt

      reply	other threads:[~2008-04-25 17:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-25 16:38 Timeclock workflow? Avdi Grimm
2008-04-25 17:35 ` Bernt Hansen [this message]

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://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87abjhzvl0.fsf@gollum.intra.norang.ca \
    --to=bernt@norang.ca \
    --cc=avdi@avdi.org \
    --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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).