emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Clean Org Clock with step
@ 2009-07-22 22:10 meingbg
  2009-07-23 16:30 ` Bastien
  2009-08-03 13:38 ` Carsten Dominik
  0 siblings, 2 replies; 6+ messages in thread
From: meingbg @ 2009-07-22 22:10 UTC (permalink / raw)
  To: emacs-orgmode


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

When using the :step day option in the clocktable, every day gets it's own
table. This is a great option! It can however easily be a lot of tables,
even if there's not too much information. Say for example there are only
items in two out of thirty tables.

Is there an option to show only non-empty tables? If not, would it be a good
idea to add such an option?

//M.G.

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

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

_______________________________________________
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

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

* Re: Clean Org Clock with step
  2009-07-22 22:10 Clean Org Clock with step meingbg
@ 2009-07-23 16:30 ` Bastien
  2009-07-24 14:26   ` meingbg
  2009-08-03 13:38 ` Carsten Dominik
  1 sibling, 1 reply; 6+ messages in thread
From: Bastien @ 2009-07-23 16:30 UTC (permalink / raw)
  To: meingbg; +Cc: emacs-orgmode

meingbg <meingbg@gmail.com> writes:

> When using the :step day option in the clocktable, every day gets it's own
> table. This is a great option! It can however easily be a lot of tables, even
> if there's not too much information. Say for example there are only items in
> two out of thirty tables.
>
> Is there an option to show only non-empty tables? If not, would it be a good
> idea to add such an option?

Yes, I think it would be a good idea.

I've been looking into the code for this, but this is not trivial.
I let Carsten sort this out :)

-- 
 Bastien

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

* Re: Clean Org Clock with step
  2009-07-23 16:30 ` Bastien
@ 2009-07-24 14:26   ` meingbg
  2009-07-25 12:37     ` Bastien
  2009-07-25 22:12     ` Bastien
  0 siblings, 2 replies; 6+ messages in thread
From: meingbg @ 2009-07-24 14:26 UTC (permalink / raw)
  To: emacs-orgmode


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

Thank you, this one would save my eyes a bit!

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.

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.

Thanks again!

//meingbg

On Thu, Jul 23, 2009 at 6:30 PM, Bastien <bastienguerry@googlemail.com>wrote:

> meingbg <meingbg@gmail.com> writes:
>
> > When using the :step day option in the clocktable, every day gets it's
> own
> > table. This is a great option! It can however easily be a lot of tables,
> even
> > if there's not too much information. Say for example there are only items
> in
> > two out of thirty tables.
> >
> > Is there an option to show only non-empty tables? If not, would it be a
> good
> > idea to add such an option?
>
> Yes, I think it would be a good idea.
>
> I've been looking into the code for this, but this is not trivial.
> I let Carsten sort this out :)
>
> --
>  Bastien
>

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

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

_______________________________________________
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

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

* Re: Clean Org Clock with step
  2009-07-24 14:26   ` meingbg
@ 2009-07-25 12:37     ` Bastien
  2009-07-25 22:12     ` Bastien
  1 sibling, 0 replies; 6+ messages in thread
From: Bastien @ 2009-07-25 12:37 UTC (permalink / raw)
  To: meingbg; +Cc: emacs-orgmode

meingbg <meingbg@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

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

* Re: Clean Org Clock with step
  2009-07-24 14:26   ` meingbg
  2009-07-25 12:37     ` Bastien
@ 2009-07-25 22:12     ` Bastien
  1 sibling, 0 replies; 6+ messages in thread
From: Bastien @ 2009-07-25 22:12 UTC (permalink / raw)
  To: meingbg; +Cc: emacs-orgmode

meingbg <meingbg@gmail.com> writes:

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

I've implemented this.  

You can use an option like ":timestamp t" in the clock report and
a timestamp will be inserted.  It looks for SCHEDULED, TIMESTAMP,
DEADLINE and TIMESTAMP_IA -- in this order.

Thanks for this idea!

-- 
 Bastien

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

* Re: Clean Org Clock with step
  2009-07-22 22:10 Clean Org Clock with step meingbg
  2009-07-23 16:30 ` Bastien
@ 2009-08-03 13:38 ` Carsten Dominik
  1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2009-08-03 13:38 UTC (permalink / raw)
  To: meingbg; +Cc: emacs-orgmode


On Jul 23, 2009, at 12:10 AM, meingbg wrote:

> When using the :step day option in the clocktable, every day gets  
> it's own table. This is a great option! It can however easily be a  
> lot of tables, even if there's not too much information. Say for  
> example there are only items in two out of thirty tables.
>
> Is there an option to show only non-empty tables? If not, would it  
> be a good idea to add such an option?

This is a good idea, but hard to implement.  To justify the effort,
you'd need to get a lot more support from others.

The easy thing I could do it to provide a hook, and you write a
function for that hook to do the cleaning up.

- Carsten

>
> //M.G.
> _______________________________________________
> 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

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

end of thread, other threads:[~2009-08-03 13:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-22 22:10 Clean Org Clock with step meingbg
2009-07-23 16:30 ` Bastien
2009-07-24 14:26   ` meingbg
2009-07-25 12:37     ` Bastien
2009-07-25 22:12     ` Bastien
2009-08-03 13:38 ` 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).