How to use elisp code to generate an org-agenda view for clocked tasks and logs etc which are sorted by timestamps? I want to view my daily done tasks and attach them as part of diary (maybe use org source block elisp code to generate output?)

So how to setup `org-agenda-custom-commands` to archive this purpose?

Thanks for your help in advance. Regards.


[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/