emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Agenda clock reporting


From: Bernt Hansen
Subject: [Orgmode] Re: Agenda clock reporting
Date: Sun, 03 Jan 2010 10:38:42 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Carsten Dominik <address@hidden> writes:

> On Jan 3, 2010, at 3:22 PM, Bernt Hansen wrote:
>
>> Carsten Dominik <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]