From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cecil Westerhof Subject: Re: how to clear computed values Date: Wed, 11 Jul 2007 13:02:58 +0200 Message-ID: <1184151778.6283.132.camel@Barebusta.DecebalComp> References: <1184092729.6283.91.camel@Barebusta.DecebalComp> <93de834e13e5289b11185b67cf4162b0@science.uva.nl> <1184142385.6253.115.camel@Barebusta.DecebalComp> <8a6b8a1aff2bb53d8a97e24f5d5c022a@science.uva.nl> <1184144557.6253.122.camel@Barebusta.DecebalComp> <6d9c720b3100b12868af1b4e535823e9@science.uva.nl> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I8ZyJ-0000xF-9k for emacs-orgmode@gnu.org; Wed, 11 Jul 2007 07:03:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I8ZyH-0000vm-Q1 for emacs-orgmode@gnu.org; Wed, 11 Jul 2007 07:03:03 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I8ZyH-0000vR-Gx for emacs-orgmode@gnu.org; Wed, 11 Jul 2007 07:03:01 -0400 Received: from smtp-vbr1.xs4all.nl ([194.109.24.21]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I8ZyG-0004KF-MA for emacs-orgmode@gnu.org; Wed, 11 Jul 2007 07:03:01 -0400 Received: from Barebusta.DecebalComp (DecebalComputing.xs4all.nl [213.84.157.201]) by smtp-vbr1.xs4all.nl (8.13.8/8.13.8) with ESMTP id l6BB2xGW014388 for ; Wed, 11 Jul 2007 13:02:59 +0200 (CEST) (envelope-from CecilWesterhof@xs4all.nl) In-Reply-To: <6d9c720b3100b12868af1b4e535823e9@science.uva.nl> 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: org-mode Op wo, 11-07-2007 te 12:19 +0200, schreef Carsten Dominik: > > That works. I hoped that it was possible to see you are on the first > > line after a hline, but this is good enough. > > Of course this is possible, you are using Lisp: > > (defun check-if-after-hline () > (save-excursion > (beginning-of-line 0) > (looking-at org-table-hline-regexp))) Okay, now it is: |---+------------+---------+-------------------+---------+--------+-------+----------+--------| | | datum | kmstand | km's | prijs/l | liters | prijs | prijs/km | km/l | |---+------------+---------+-------------------+---------+--------+-------+----------+--------| | # | | 155111 | | | | | | | | # | 2007-07-09 | 156146 | 1035 | 102.2 | 62.25 | 63.62 | 6.147 | 16.627 | | # | 2007-07-11 | 6953 | Verkeerde kmstand | | | | | | | # | | | | | | | | | |---+------------+---------+-------------------+---------+--------+-------+----------+--------| #+TBLFM: $4='(if (and (nz @-1$3) (nz $3)) (if (> $3 @-1$3) (- $3 @-1$3) (if (not (check-if-after-hline)) "Verkeerde kmstand" "")) "");N::$7='(if (and (nz $5) (nz $6)) (format "%.2f" (/ (* $5 $6) 100)) "");N::$8='(if (and (nz $4) (nz $7)) (format "%.3f" (/ (* $7 100) $4)) "");N::$9='(if (and (nz $4) (nz $6)) (format "%.3f" (/ $4 $6)) "");N This looks perfect. Just one more question. ;-} I would like to display the days between rows. I found time-date.el, but this only works with: The five data representations used are the following: date An RFC822 (or similar) date string. For instance: "Sat Sep 12 12:21:54 1998 +0200". time An internal Emacs time. For instance: (13818 26466). seconds A floating point representation of the internal Emacs time. For instance: 905595714.0. days An integer number representing the number of days since 00000101. For instance: 729644. decoded time A list of decoded time. For instance: (54 21 12 12 9 1998 6 t 7200). Is there a way to work with dates like 2007-09-11? -- Cecil Westerhof