From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: Timeclock workflow? Date: Fri, 25 Apr 2008 13:35:23 -0400 Message-ID: <87abjhzvl0.fsf@gollum.intra.norang.ca> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JpRpb-0000oj-0Q for emacs-orgmode@gnu.org; Fri, 25 Apr 2008 13:35:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JpRpa-0000oP-D4 for emacs-orgmode@gnu.org; Fri, 25 Apr 2008 13:35:30 -0400 Received: from [199.232.76.173] (port=51118 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JpRpa-0000oI-9X for emacs-orgmode@gnu.org; Fri, 25 Apr 2008 13:35:30 -0400 Received: from mho-02-bos.mailhop.org ([63.208.196.179]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JpRpa-0007W0-1b for emacs-orgmode@gnu.org; Fri, 25 Apr 2008 13:35:30 -0400 In-Reply-To: (Avdi Grimm's message of "Fri\, 25 Apr 2008 12\:38\:50 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Avdi Grimm Cc: org-mode mailing list "Avdi Grimm" 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