From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Computations on properties Date: Wed, 09 Oct 2013 14:50:11 +0200 Message-ID: <87li22mwvw.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTtDj-000644-9a for emacs-orgmode@gnu.org; Wed, 09 Oct 2013 08:50:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTtDd-0003Mt-51 for emacs-orgmode@gnu.org; Wed, 09 Oct 2013 08:50:31 -0400 Received: from plane.gmane.org ([80.91.229.3]:38466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTtDc-0003MS-UL for emacs-orgmode@gnu.org; Wed, 09 Oct 2013 08:50:25 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VTtDb-0007sZ-DB for emacs-orgmode@gnu.org; Wed, 09 Oct 2013 14:50:23 +0200 Received: from e178191060.adsl.alicedsl.de ([85.178.191.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Oct 2013 14:50:23 +0200 Received: from tjolitz by e178191060.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Oct 2013 14:50:23 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Thierry Pellé writes: Hi, > I'm seeking how to do something like that > > Let the following text inserted in an org-mode file > > * Mean Calculation > :PROPERTIES: > :VAL1: 5 > :VAL2: 10 > :COEF: 10 > :END: > > I would like to append the result of a computation > like RES=(VAL1*COEF+VAL2)/(COEF+1) > > Something like > * Mean Calculation > ... > :END: > > Mean Calculation=RES (where RES is the value of the result) > > I think to do this with a python script but is there a more org-mode/emacs > method to do it? > > Thanks > Thierry > > PS: I don't want to use org spreadsheet But that would probably be the appropriate tool. Otherwise you could use the property API in an elisp program ,------------------------------------------------------ | http://orgmode.org/manual/Using-the-property-API.html `------------------------------------------------------ to read out the property values. Then do the calculation and finally add a new property with the result. -- cheers, Thorsten