[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Date-centric Clocktable
From: |
Rasmus |
Subject: |
Re: [O] Date-centric Clocktable |
Date: |
Wed, 07 Sep 2011 12:56:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Olaf Dietsche <address@hidden> writes:
> If you insist on elisp, maybe something along these (untested) lines
> might work:
It just nicer to do text stuff from within Emacs but my personal Lisp
skill are surpassed by my Python skills. That is not to say that any of
the skill sets are high. . .
The function didn't work in my test.org in emacs -q. I will investigate
more later when I've got more time.
> ---8<--- cut here ---
> (defvar clockstable)
>
> (defun collect-clock-lines ()
> (org-narrow-to-subtree)
> (let ((re (concat "^[ \t]*" org-clock-string "[ \t]+\\(.+?\\)[ \t]+=>[
> \t]+\\(.+\\)"))
> (headline (nth 4 (org-heading-components))))
> (while (re-search-forward re)
> (setq clockstable (concat clockstable (match-string 1) "|" headline "|"
> (match-string 2) "\n")))))
>
> (defun summarize-clocks ()
> (interactive)
> (setq clockstable "| date | headline | total |\n|-----+----+----|\n")
> (org-map-entries collect-clock-lines nil 'agenda)
> (insert clockstable))
> --- cut here --->8---
Thanks again,
Rasmus
--
Sent from my Emacs
- Re: [O] Date-centric Clocktable, (continued)
- Re: [O] Date-centric Clocktable, Olaf Dietsche, 2011/09/07
- Re: [O] Date-centric Clocktable, Rasmus, 2011/09/07
- Re: [O] Date-centric Clocktable, Olaf Dietsche, 2011/09/07
- Re: [O] Date-centric Clocktable, Carsten Dominik, 2011/09/07
- Re: [O] Date-centric Clocktable, Olaf Dietsche, 2011/09/07
- Re: [O] Date-centric Clocktable, Rasmus, 2011/09/07
- Re: [O] Date-centric Clocktable, A. Ryan Reynolds, 2011/09/08
- Re: [O] Date-centric Clocktable,
Rasmus <=
- Re: [O] Date-centric Clocktable, Olaf Dietsche, 2011/09/07
- Re: [O] Date-centric Clocktable, Olaf Dietsche, 2011/09/07
- Re: [O] Date-centric Clocktable, Rasmus, 2011/09/07