meingbg <mein...@gmail.com> 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


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

Reply via email to