[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Patch for resolving "away time" when clocked in
From: |
John Wiegley |
Subject: |
[Orgmode] Patch for resolving "away time" when clocked in |
Date: |
Fri, 16 Oct 2009 03:03:19 -0400 |
Looking for anyone who uses Org's time clocking facilities and is
willing to test this with me. I've been using it for a couple of days
now. The functionality is based on the way the commercial app
OfficeTime handles idleness.
Excerpt from the new manual section:
# Resolving idle time
If you clock in on a work item, and then walk away from your
computer---perhaps to take a phone call---you often need to
``resolve'' the
time you were away by either subtracting it from the current clock, or
applying it to another one.
By customizing the variable @code{org-clock-idle-time} to some
integer, such
as 10 or 15, Emacs can alert you when you get back to your computer
after
being idle for that many address@hidden computers using Mac OS X,
idleness is based on actual user idleness, not just Emacs' idle
time.}, and
ask what you want to do with the idle time. There will be a question
waiting
for you when you get back, indicating how much idle time has passed
(constantly updated with the current amount), as well as a set of
choices to
correct the discrepancy:
@table @kbd
@item k
To keep some or all of the minutes and stay clocked in, press @key
{k}. Org
will ask how many of the minutes to keep. Press @key{RET} to keep
them all,
effectively changing nothing, or enter a number to keep that many
minutes.
@item K
If you use the shift key and press @key{K}, it will keep however many
minutes
you request and then immediately clock out of that task. If you keep
all of
the minutes, this is the same as just clocking out of the current task.
@item s
To keep none of the minutes, use @key{s} to subtract all the away time
from
the clock, and then check back in from the moment you returned.
@item S
To keep none of the minutes and just clock out at the start of the
away time,
use the shift key and press @key{S}. Remember that using shift will
always
leave you clocked out, no matter which option you choose.
@item C
To cancel the clock altogether, use @key{C}. Note that if instead of
cancelling you subtract the away time, and the resulting clock amount
is less
than a minute, the clock will still be cancelled rather than clutter
up the
log with an empty entry.
@end table
What if you subtracted those away minutes from the current clock, and
now
want to apply them to a new clock? Simply clock in to any task
immediately
after the subtraction. Org will notice that you have subtracted time
``on
the books'', so to speak, and will ask if you want to apply those
minutes to
the next task you clock in on.
There is one other instance when this clock resolution magic occurs.
Say you
were clocked in and hacking away, and suddenly your cat chased a mouse
who
scared a hamster that crashed into your UPS's power button! You
suddenly
lose all your buffers, but thanks to auto-save you still have your
recent Org
mode changes, including your last clock in.
If you restart Emacs and clock into any task, Org will notice that you
have a
dangling clock which was never clocked out from your last session.
Using the
Org file's last modified time as the beginning of the ``away'' period,
Org
will ask how you want to resolve that unaccounted-for time. The logic
and
behavior is identical to dealing with away time due to idleness, it's
just
happening due to a recovery event rather than a set amount of idle time.
You can also check all the files visited by your Org agenda for dangling
clocks at any time using @kbd{M-x org-resolve-clocks}.
John
0001-Added-clock-resolution-logic.patch
Description: Binary data
- [Orgmode] Patch for resolving "away time" when clocked in,
John Wiegley <=
[Orgmode] Re: Patch for resolving "away time" when clocked in, Gregory J. Grubbs, 2009/10/16