From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Using clock in/out as an attendance register? Date: Tue, 11 Sep 2007 06:46:25 +0200 Message-ID: <871wd56c7y.fsf@bzg.ath.cx> References: <87642h6epy.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IUxe5-0000Kb-3o for emacs-orgmode@gnu.org; Tue, 11 Sep 2007 00:46:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IUxe1-0000Fe-Te for emacs-orgmode@gnu.org; Tue, 11 Sep 2007 00:46:40 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IUxe1-0000FT-O2 for emacs-orgmode@gnu.org; Tue, 11 Sep 2007 00:46:37 -0400 Received: from hu-out-0506.google.com ([72.14.214.224]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IUxe1-0001rY-4Y for emacs-orgmode@gnu.org; Tue, 11 Sep 2007 00:46:37 -0400 Received: by hu-out-0506.google.com with SMTP id 23so541743huc for ; Mon, 10 Sep 2007 21:46:35 -0700 (PDT) In-Reply-To: <87642h6epy.fsf@bzg.ath.cx> (Bastien's message of "Tue, 11 Sep 2007 05:52:25 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Bastien 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