From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Clean Org Clock with step Date: Sat, 25 Jul 2009 20:37:43 +0800 Message-ID: <87my6t0wh4.fsf@bzg.ath.cx> References: <87ljmfbaxe.fsf@bzg.ath.cx> 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 1MUgVg-00054M-HG for emacs-orgmode@gnu.org; Sat, 25 Jul 2009 08:37:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MUgVb-000548-3O for emacs-orgmode@gnu.org; Sat, 25 Jul 2009 08:37:55 -0400 Received: from [199.232.76.173] (port=47751 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MUgVa-000545-UD for emacs-orgmode@gnu.org; Sat, 25 Jul 2009 08:37:50 -0400 Received: from mail-px0-f193.google.com ([209.85.216.193]:49857) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MUgVa-0001jS-Iz for emacs-orgmode@gnu.org; Sat, 25 Jul 2009 08:37:50 -0400 Received: by pxi31 with SMTP id 31so1555916pxi.14 for ; Sat, 25 Jul 2009 05:37:49 -0700 (PDT) In-Reply-To: (meingbg@gmail.com's message of "Fri, 24 Jul 2009 16:26:45 +0200") 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: meingbg Cc: emacs-orgmode@gnu.org meingbg writes: > Just looking at the output, maybe this could be implemented as a regexp replace > on the entire block performed after putting together the tables? Just thinking > it might save you some headache, if you don't think it's too ugly of a hack. Well, it *is* to ugly of a hack, but here it is: (defun my-org-remove-empty-daily-clock-report () "Remove empty daily clock reports" (interactive) (while (re-search-forward "^Daily report:.*$" nil t) (let ((beg0 (match-beginning 0)) (beg1 (1+ (match-end 0))) (end (save-excursion (re-search-forward "^$\\|^#\\+END.*" nil t) (match-beginning 0)))) (when (re-search-forward "Total time.*0:00" end t) (delete-region beg0 end) (delete-char -1))))) It will definitely not make its way thru Org, we need a mechanism that prevents the display of empty report instead. > And while I'm at it - my employer requires me to report not only what I'm doing > and how long it takes, but also when I'm doing it. I assume most people > wouldn't benefit from a feature like this, and that there are many other things > on the wish list with higher priority, so I'm just asking if someone could > point out an API guide or something like that, it would be wonderful. That makes sense... -- Bastien