From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Agenda clock reporting Date: Sun, 3 Jan 2010 14:24:59 +0100 Message-ID: <01B0D18A-0F04-44A3-A340-50128FFEFC57@gmail.com> References: <87fx73qhxq.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NRQSB-0005eu-MF for emacs-orgmode@gnu.org; Sun, 03 Jan 2010 08:25:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NRQS7-0005d3-5o for emacs-orgmode@gnu.org; Sun, 03 Jan 2010 08:25:07 -0500 Received: from [199.232.76.173] (port=54655 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRQS6-0005cy-UB for emacs-orgmode@gnu.org; Sun, 03 Jan 2010 08:25:02 -0500 Received: from mail-ew0-f224.google.com ([209.85.219.224]:34851) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NRQS6-0000CZ-Vi for emacs-orgmode@gnu.org; Sun, 03 Jan 2010 08:25:03 -0500 Received: by ewy24 with SMTP id 24so17083726ewy.26 for ; Sun, 03 Jan 2010 05:25:01 -0800 (PST) In-Reply-To: <87fx73qhxq.fsf@gollum.intra.norang.ca> 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: Bernt Hansen Cc: Carsten Dominik , emacs-orgmode@gnu.org 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