[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Using clock in/out as an attendance register?
From: |
Bastien |
Subject: |
Re: [Orgmode] Using clock in/out as an attendance register? |
Date: |
Tue, 11 Sep 2007 06:46:25 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux) |
Bastien <address@hidden> writes:
> See (info "(Org)Clocking work time") for details.
I just stumble upon this error:
"The CLOCK property can not yet be set with `org-entry-put'"
I assume there is a plan for setting the CLOCK property directly
(through org-clock-in/out), and I guess both `org-clock-sum' and
`org-clock-report' will be able to use this information.
PS: I found the plan for the CLOCK property while trying to write a
function to merge all those CLOCK lines. Here it is, in case someone
wants to store dormant clocking info:
(defun bzg-org-merge-clocks nil
"Sum clocking information for the current subtree and store it
as a :Clock: property."
(interactive)
(org-clock-sum)
(save-excursion
(org-back-to-heading)
(while (re-search-forward
(concat "^[ \t]*" org-clock-string ".*$")
(save-excursion (outline-next-heading) (point)) t)
(replace-match ""))
(org-back-to-heading)
(let ((minutes (get-text-property (point) :org-clock-minutes))
(elapsed (string-to-number (org-entry-get (point) "Clock"))))
(org-entry-put (point) "Clock"
(number-to-string (+ minutes elapsed))))))
--
Bastien