emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Agenda clock reporting
@ 2009-12-22 13:03 Bernt Hansen
  2009-12-22 15:16 ` Clock logging -- possible to include seconds? Bill Powell
  2010-01-03 13:24 ` Agenda clock reporting Carsten Dominik
  0 siblings, 2 replies; 10+ messages in thread
From: Bernt Hansen @ 2009-12-22 13:03 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Hi Carsten,

I use the agenda clock report during the end of my day.  Would it be
difficult to have it include the currently clocking task if a clock is
active?

I clock billable and nonbillable tasks during the day.  If I want to
stop working at 8 billable hours I currently run the clock report and
then find the current active clock entry (last one on the page with 'l'
in the agenda) and manually add the time accumulated to the clock report
to see when I'm done for the day.  This is a bit tedious and error
prone.

I'm thinking that since agenda clock reports are not permanent it
wouldn't hurt to include the current clocking item in the agenda
report if that is easy to do.  I've been digging around in the clock
report code in my limited spare time but haven't yet made any useful
progress on this task.

Any pointers on where to make this modification would be appreciated.

Thanks!

Bernt

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

* Clock logging -- possible to include seconds?
  2009-12-22 13:03 Agenda clock reporting Bernt Hansen
@ 2009-12-22 15:16 ` Bill Powell
  2009-12-22 17:11   ` Scot Becker
  2009-12-26 11:14   ` Carsten Dominik
  2010-01-03 13:24 ` Agenda clock reporting Carsten Dominik
  1 sibling, 2 replies; 10+ messages in thread
From: Bill Powell @ 2009-12-22 15:16 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Carsten Dominik, emacs-orgmode


Hi folks,

Thanks again to y'all for org-mode. Here's a quick question: how hard
would it be to include seconds in the clock logging? It may sound like
a silly request, but I often have to work on two or three billable
different projects in a day, sometimes switching back and forth
between them. When you add up all those intervals for an invoice
covering a month or more, counting those half and quarter
minutes might add up to an additional hour or so of billable time.

It's possible I'm just misunderstanding the org-mode algorithm, and
that its rounding turns out to be almost as accurate over the long
haul. Plus, many people expect to be billed by the half hour anyhow.
But I time various projects for myself, too, so this is really an
interest for my own work. What do you all think?

Bill Powell

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

* Re: Clock logging -- possible to include seconds?
  2009-12-22 15:16 ` Clock logging -- possible to include seconds? Bill Powell
@ 2009-12-22 17:11   ` Scot Becker
  2009-12-26 11:14   ` Carsten Dominik
  1 sibling, 0 replies; 10+ messages in thread
From: Scot Becker @ 2009-12-22 17:11 UTC (permalink / raw)
  To: Bill Powell; +Cc: Bernt Hansen, Carsten Dominik, emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1379 bytes --]

I have no idea if it's possible.  If it turns out not to be, you could
console yourself with the thought that the rounding error will most likely
be spread around.  So everyone gets 'stolen from' about as often as they get
'given to'.



On Tue, Dec 22, 2009 at 3:16 PM, Bill Powell <bill@billpowellisalive.com>wrote:

>
> Hi folks,
>
> Thanks again to y'all for org-mode. Here's a quick question: how hard
> would it be to include seconds in the clock logging? It may sound like
> a silly request, but I often have to work on two or three billable
> different projects in a day, sometimes switching back and forth
> between them. When you add up all those intervals for an invoice
> covering a month or more, counting those half and quarter
> minutes might add up to an additional hour or so of billable time.
>
> It's possible I'm just misunderstanding the org-mode algorithm, and
> that its rounding turns out to be almost as accurate over the long
> haul. Plus, many people expect to be billed by the half hour anyhow.
> But I time various projects for myself, too, so this is really an
> interest for my own work. What do you all think?
>
> Bill Powell
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

[-- Attachment #1.2: Type: text/html, Size: 1903 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Clock logging -- possible to include seconds?
  2009-12-22 15:16 ` Clock logging -- possible to include seconds? Bill Powell
  2009-12-22 17:11   ` Scot Becker
@ 2009-12-26 11:14   ` Carsten Dominik
  2009-12-26 12:40     ` Bernt Hansen
  1 sibling, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2009-12-26 11:14 UTC (permalink / raw)
  To: Bill Powell; +Cc: Bernt Hansen, Carsten Dominik, emacs-orgmode


On Dec 22, 2009, at 4:16 PM, Bill Powell wrote:

>
> Hi folks,
>
> Thanks again to y'all for org-mode. Here's a quick question: how hard
> would it be to include seconds in the clock logging? It may sound like
> a silly request, but I often have to work on two or three billable
> different projects in a day, sometimes switching back and forth
> between them. When you add up all those intervals for an invoice
> covering a month or more, counting those half and quarter
> minutes might add up to an additional hour or so of billable time.
>
> It's possible I'm just misunderstanding the org-mode algorithm, and
> that its rounding turns out to be almost as accurate over the long
> haul. Plus, many people expect to be billed by the half hour anyhow.
> But I time various projects for myself, too, so this is really an
> interest for my own work. What do you all think?
>
> Bill Powell

Hi Bill,

I would think that this will average away.  When clocking in,
Org only notices the full minutes.  If you are clocking in at
14:22:59 and out again 1 second later at 14:23:00 you will
cheat 59 seconds into the clocking interval and bill a whole
minute.  So this kind of *cheating* goes both ways and will
average out.

And yes, it really would seem strange to clock by the second :-)

- Carsten

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

* Re: Clock logging -- possible to include seconds?
  2009-12-26 11:14   ` Carsten Dominik
@ 2009-12-26 12:40     ` Bernt Hansen
  0 siblings, 0 replies; 10+ messages in thread
From: Bernt Hansen @ 2009-12-26 12:40 UTC (permalink / raw)
  To: Bill Powell; +Cc: Carsten Dominik, emacs-orgmode, Carsten Dominik

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On Dec 22, 2009, at 4:16 PM, Bill Powell wrote:
>
>>
>> Hi folks,
>>
>> Thanks again to y'all for org-mode. Here's a quick question: how hard
>> would it be to include seconds in the clock logging? It may sound like
>> a silly request, but I often have to work on two or three billable
>> different projects in a day, sometimes switching back and forth
>> between them. When you add up all those intervals for an invoice
>> covering a month or more, counting those half and quarter
>> minutes might add up to an additional hour or so of billable time.
>>
>> It's possible I'm just misunderstanding the org-mode algorithm, and
>> that its rounding turns out to be almost as accurate over the long
>> haul. Plus, many people expect to be billed by the half hour anyhow.
>> But I time various projects for myself, too, so this is really an
>> interest for my own work. What do you all think?
>>
>> Bill Powell
>
> Hi Bill,
>
> I would think that this will average away.  When clocking in,
> Org only notices the full minutes.  If you are clocking in at
> 14:22:59 and out again 1 second later at 14:23:00 you will
> cheat 59 seconds into the clocking interval and bill a whole
> minute.  So this kind of *cheating* goes both ways and will
> average out.
>
> And yes, it really would seem strange to clock by the second :-)

I also think clocking by second is overkill.  I clock time spent on
things in a day and normally bill hours worked per day.  When billing
for time spent over an entire month I go through the clock reports for
each day separately and add up the hours for each project.  Rounding
clocked time to less than 15 minutes per day when doing billing doesn't
make sense to me -- most people I think round to half or full hours.

I often work on multiple billable items per day too - and switch all
back and forth on my clocking items.  I try to keep my clocking items so
that they include every minute worked from the start to the finish of my
day - then I just look at the time spent on each billable project at the
end of the day to figure out how much to bill.

-Bernt

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

* Re: Agenda clock reporting
  2009-12-22 13:03 Agenda clock reporting Bernt Hansen
  2009-12-22 15:16 ` Clock logging -- possible to include seconds? Bill Powell
@ 2010-01-03 13:24 ` Carsten Dominik
  2010-01-03 14:22   ` Bernt Hansen
  1 sibling, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2010-01-03 13:24 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Carsten Dominik, emacs-orgmode


On Dec 22, 2009, at 2:03 PM, Bernt Hansen wrote:

> Hi Carsten,
>
> I use the agenda clock report during the end of my day.  Would it be
> difficult to have it include the currently clocking task if a clock is
> active?
>
> I clock billable and nonbillable tasks during the day.  If I want to
> stop working at 8 billable hours I currently run the clock report and
> then find the current active clock entry (last one on the page with  
> 'l'
> in the agenda) and manually add the time accumulated to the clock  
> report
> to see when I'm done for the day.  This is a bit tedious and error
> prone.
>
> I'm thinking that since agenda clock reports are not permanent it
> wouldn't hurt to include the current clocking item in the agenda
> report if that is easy to do.  I've been digging around in the clock
> report code in my limited spare time but haven't yet made any useful
> progress on this task.
>
> Any pointers on where to make this modification would be appreciated.

Hi Bernt,

I think the right place would be `org-clock-sum'.  Right now,
this looks only for complete clock lines.  You could modify the regexp
to check for incomplete lines (first time stamp only) and then check
if the org-clock-marker points to the current line.  If yes, you could
use the current time as the end time and proceed.

Send me a patch if you get this to work, with a customization variable
to turn this off.

HTH

- Carsten

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

* Re: Agenda clock reporting
  2010-01-03 13:24 ` Agenda clock reporting Carsten Dominik
@ 2010-01-03 14:22   ` Bernt Hansen
  2010-01-03 14:41     ` Carsten Dominik
  0 siblings, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2010-01-03 14:22 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Carsten Dominik, emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On Dec 22, 2009, at 2:03 PM, Bernt Hansen wrote:
>
>> Hi Carsten,
>>
>> I use the agenda clock report during the end of my day.  Would it be
>> difficult to have it include the currently clocking task if a clock is
>> active?
>>
>> I clock billable and nonbillable tasks during the day.  If I want to
>> stop working at 8 billable hours I currently run the clock report and
>> then find the current active clock entry (last one on the page with
>> l'
>> in the agenda) and manually add the time accumulated to the clock
>> report
>> to see when I'm done for the day.  This is a bit tedious and error
>> prone.
>>
>> I'm thinking that since agenda clock reports are not permanent it
>> wouldn't hurt to include the current clocking item in the agenda
>> report if that is easy to do.  I've been digging around in the clock
>> report code in my limited spare time but haven't yet made any useful
>> progress on this task.
>>
>> Any pointers on where to make this modification would be appreciated.
>
> Hi Bernt,
>
> I think the right place would be `org-clock-sum'.  Right now,
> this looks only for complete clock lines.  You could modify the regexp
> to check for incomplete lines (first time stamp only) and then check
> if the org-clock-marker points to the current line.  If yes, you could
> use the current time as the end time and proceed.
>
> Send me a patch if you get this to work, with a customization variable
> to turn this off.
>
> HTH

Yes it does thanks.  I found the logic that uses the regexp for parsing
the times and summing them in reverse up to the headline in
org-clock-sum.  I haven't modified the regexp yet but was planning
something similar to what you describe above.

   - org-clock-sum
   - Runs through headings in reverse order
   - counts clock entries bottom up to headline
   - adds a text property to the headline with total time
   - need to find out if current heading is clocking
   - add entry for open clock time with closing time to get correct total
   - regexp needs to match open clock entries
   - for open clock entry matches set time to zero
   - reset time if this is the current clocking entry

I'll post the patch whenever it gets done.

Thanks!
Bernt

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

* Re: Agenda clock reporting
  2010-01-03 14:22   ` Bernt Hansen
@ 2010-01-03 14:41     ` Carsten Dominik
  2010-01-03 15:38       ` Bernt Hansen
  0 siblings, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2010-01-03 14:41 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Carsten Dominik, emacs-orgmode


On Jan 3, 2010, at 3:22 PM, Bernt Hansen wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> On Dec 22, 2009, at 2:03 PM, Bernt Hansen wrote:
>>
>>> Hi Carsten,
>>>
>>> I use the agenda clock report during the end of my day.  Would it be
>>> difficult to have it include the currently clocking task if a  
>>> clock is
>>> active?
>>>
>>> I clock billable and nonbillable tasks during the day.  If I want to
>>> stop working at 8 billable hours I currently run the clock report  
>>> and
>>> then find the current active clock entry (last one on the page with
>>> l'
>>> in the agenda) and manually add the time accumulated to the clock
>>> report
>>> to see when I'm done for the day.  This is a bit tedious and error
>>> prone.
>>>
>>> I'm thinking that since agenda clock reports are not permanent it
>>> wouldn't hurt to include the current clocking item in the agenda
>>> report if that is easy to do.  I've been digging around in the clock
>>> report code in my limited spare time but haven't yet made any useful
>>> progress on this task.
>>>
>>> Any pointers on where to make this modification would be  
>>> appreciated.
>>
>> Hi Bernt,
>>
>> I think the right place would be `org-clock-sum'.  Right now,
>> this looks only for complete clock lines.  You could modify the  
>> regexp
>> to check for incomplete lines (first time stamp only) and then check
>> if the org-clock-marker points to the current line.  If yes, you  
>> could
>> use the current time as the end time and proceed.
>>
>> Send me a patch if you get this to work, with a customization  
>> variable
>> to turn this off.
>>
>> HTH
>
> Yes it does thanks.  I found the logic that uses the regexp for  
> parsing
> the times and summing them in reverse up to the headline in
> org-clock-sum.  I haven't modified the regexp yet but was planning
> something similar to what you describe above.
>
>   - org-clock-sum
>   - Runs through headings in reverse order
>   - counts clock entries bottom up to headline
>   - adds a text property to the headline with total time
>   - need to find out if current heading is clocking

Yes, the alternative approach would be to *not* modify the regexp, but  
to
check if org-clock-hd-marker points to the current headline and then
add the time since the clock started (in `org-clock-start-time') to  
the appropriate
field in the ltimes vector before extracting the total time.  So you  
would do
this as the first thing when you find a headline, and the proceed  
normally.

Sounds simpler than modifying the regexp and would not cause any  
problems
with other incomplete clock entries that may have been left behind and  
never
properly resolved......

- Carsten


>   - add entry for open clock time with closing time to get correct  
> total
>   - regexp needs to match open clock entries
>   - for open clock entry matches set time to zero
>   - reset time if this is the current clocking entry
>
> I'll post the patch whenever it gets done.
>
> Thanks!
> Bernt

- Carsten

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

* Re: Agenda clock reporting
  2010-01-03 14:41     ` Carsten Dominik
@ 2010-01-03 15:38       ` Bernt Hansen
  2010-01-03 15:44         ` Carsten Dominik
  0 siblings, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2010-01-03 15:38 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Carsten Dominik, emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On Jan 3, 2010, at 3:22 PM, Bernt Hansen wrote:
>
>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>>
>>> I think the right place would be `org-clock-sum'.  Right now,
>>> this looks only for complete clock lines.  You could modify the
>>> regexp
>>> to check for incomplete lines (first time stamp only) and then check
>>> if the org-clock-marker points to the current line.  If yes, you
>>> could
>>> use the current time as the end time and proceed.
>>>
>>> Send me a patch if you get this to work, with a customization
>>> variable
>>> to turn this off.
>>>
>>> HTH
>>
>> Yes it does thanks.  I found the logic that uses the regexp for
>> parsing
>> the times and summing them in reverse up to the headline in
>> org-clock-sum.  I haven't modified the regexp yet but was planning
>> something similar to what you describe above.
>>
>>   - org-clock-sum
>>   - Runs through headings in reverse order
>>   - counts clock entries bottom up to headline
>>   - adds a text property to the headline with total time
>>   - need to find out if current heading is clocking
>
> Yes, the alternative approach would be to *not* modify the regexp, but
> to
> check if org-clock-hd-marker points to the current headline and then
> add the time since the clock started (in `org-clock-start-time') to
> the appropriate
> field in the ltimes vector before extracting the total time.  So you
> would do
> this as the first thing when you find a headline, and the proceed
> normally.
>
> Sounds simpler than modifying the regexp and would not cause any
> problems
> with other incomplete clock entries that may have been left behind and
> never
> properly resolved......

That does sound simpler ... I'll give that a try.

Thanks!
Bernt

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

* Re: Agenda clock reporting
  2010-01-03 15:38       ` Bernt Hansen
@ 2010-01-03 15:44         ` Carsten Dominik
  0 siblings, 0 replies; 10+ messages in thread
From: Carsten Dominik @ 2010-01-03 15:44 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Carsten Dominik, emacs-orgmode


On Jan 3, 2010, at 4:38 PM, Bernt Hansen wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> On Jan 3, 2010, at 3:22 PM, Bernt Hansen wrote:
>>
>>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>>>
>>>> I think the right place would be `org-clock-sum'.  Right now,
>>>> this looks only for complete clock lines.  You could modify the
>>>> regexp
>>>> to check for incomplete lines (first time stamp only) and then  
>>>> check
>>>> if the org-clock-marker points to the current line.  If yes, you
>>>> could
>>>> use the current time as the end time and proceed.
>>>>
>>>> Send me a patch if you get this to work, with a customization
>>>> variable
>>>> to turn this off.
>>>>
>>>> HTH
>>>
>>> Yes it does thanks.  I found the logic that uses the regexp for
>>> parsing
>>> the times and summing them in reverse up to the headline in
>>> org-clock-sum.  I haven't modified the regexp yet but was planning
>>> something similar to what you describe above.
>>>
>>>  - org-clock-sum
>>>  - Runs through headings in reverse order
>>>  - counts clock entries bottom up to headline
>>>  - adds a text property to the headline with total time
>>>  - need to find out if current heading is clocking
>>
>> Yes, the alternative approach would be to *not* modify the regexp,  
>> but
>> to
>> check if org-clock-hd-marker points to the current headline and then
>> add the time since the clock started (in `org-clock-start-time') to
>> the appropriate
>> field in the ltimes vector before extracting the total time.  So you
>> would do
>> this as the first thing when you find a headline, and the proceed
>> normally.
>>
>> Sounds simpler than modifying the regexp and would not cause any
>> problems
>> with other incomplete clock entries that may have been left behind  
>> and
>> never
>> properly resolved......
>
> That does sound simpler ... I'll give that a try.

In fact, you only need to add the time to t1, not to the ltimes  
vector.....

- Carsten

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

end of thread, other threads:[~2010-01-03 15:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-22 13:03 Agenda clock reporting Bernt Hansen
2009-12-22 15:16 ` Clock logging -- possible to include seconds? Bill Powell
2009-12-22 17:11   ` Scot Becker
2009-12-26 11:14   ` Carsten Dominik
2009-12-26 12:40     ` Bernt Hansen
2010-01-03 13:24 ` Agenda clock reporting Carsten Dominik
2010-01-03 14:22   ` Bernt Hansen
2010-01-03 14:41     ` Carsten Dominik
2010-01-03 15:38       ` Bernt Hansen
2010-01-03 15:44         ` Carsten Dominik

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