From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.help Subject: Re: org-mode time spreadsheet Date: Wed, 14 Jan 2009 07:46:38 -0800 (PST) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1231951256 28405 80.91.229.12 (14 Jan 2009 16:40:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Jan 2009 16:40:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 14 17:42:08 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LN8oX-0004jI-KQ for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jan 2009 17:41:57 +0100 Original-Received: from localhost ([127.0.0.1]:48297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LN8nH-0003L4-5Z for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jan 2009 11:40:39 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!i20g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 59 Original-NNTP-Posting-Host: 212.209.35.73 Original-X-Trace: posting.google.com 1231947998 20640 127.0.0.1 (14 Jan 2009 15:46:38 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 14 Jan 2009 15:46:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i20g2000prf.googlegroups.com; posting-host=212.209.35.73; posting-account=k_QfHQoAAACfswK3kvc6w0qLbkOOWev5 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:166005 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61333 Archived-At: On 10 Jan, 03:22, Shelagh Manton wrote: > On Fri, 09 Jan 2009 00:09:16 -0800, Deniz Dogan wrote: > > I hope this formats well, because I'm posting this through Google > > Groups... Anyways... > > > Hi > > > I'm trying to have an org-mode table which shows a working day (not > > necessarily every normal work day, I enter these myself) and when I got > > in, when I went out to lunch, when I came back, and when I left for the > > day. I want the last column "TOT" to display how long I was at work > > minus the time I was out for lunch. > > > I'm well aware of timeclock-in, timeclock-out, as well as org-mode's C- > > c C-x C-i/C-o functionality, but I really want to have it as a > > spreadsheet. However, it seems that calc isn't that good at working wit= h > > times, so now I'm asking you for help. Is this possible to do with plai= n > > org-mode? If so, what am I doing wrong? Below is the file I'm currently > > using and it seems that it doesn't realize that the values are actually > > timestamps. > > > | DATE =A0 =A0 =A0 | =A0 =A0IN | LUNCH FROM | LUNCH TO | =A0 OUT | TOT = =A0 =A0| > > |------------+-------+------------+----------+-------+--------| | THU 1= 8 > > NOV | =A09:30 | =A0 =A0 =A012:30 | =A0 =A013:40 | 14:20 | 2:5 =A0 =A0| = | FRI 31 DEC | > > 10:00 | =A0 =A0 =A012:00 | =A0 =A014:00 | 16:00 | #ERROR | | SAT 1 JAN = =A0| =A08:00 | > > =A0 =A0 12:00 | =A0 =A012:30 | 16:00 | #ERROR | | MON 5 JAN =A0| =A09:0= 0 | =A0 =A0 > > 12:45 | =A0 =A013:15 | 16:00 | #ERROR | | TUE 6 JAN =A0| 16:30 | =A0 = =A0 =A017:30 | > > =A0 18:30 | 22:30 | 1:5 =A0 =A0| | WED 7 JAN =A0| =A09:00 | =A0 =A0 =A0= 12:00 | =A0 =A012:40 > > | 20:45 | 11:05 =A0| | THU 8 JAN =A0| 12:30 | =A0 =A0 =A015:00 | =A0 = =A015:40 | 18:30 > > | =A0 =A0 =A0 =A0| | FRI 9 JAN =A0| =A09:00 | =A0 =A0 =A0 =A0 =A0 =A0| = =A0 =A0 =A0 =A0 =A0| =A0 =A0 =A0 | =A0 =A0 =A0 > > | #+TBLFM: $6=3D$5-$2 > > > Deniz > > If you use the notation for time that calc expects the calculations will > work. > > ie instead of 10:15 use 10@ 15' or even 10h 15m > > Shelagh So suppose I want to change the format from H@ M' S" to H:M.S, how would I go about doing that? I tried (setq calc-hms-format "%s:%s.%s") and (defcalcvar) in the same manner, but it just wouldn't work. Looking in the source code, not being the best of Lisp hackers, it seems that org-mode doesn't honor the variable. Deniz