emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Computations on properties


From: Eric Abrahamsen
Subject: Re: [O] Computations on properties
Date: Wed, 09 Oct 2013 17:29:03 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)

Thierry Pellé <address@hidden> 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?

Sometimes I think it would be nice to have a way to draw property values
directly into a babel block, the way you can with table data. Sort of
like:

* Heading
  :PROPERTIES:
  :ID:       3f78f08a-ccca-4fc0-aba9-2a192f7a0e5a
  :foo:  5
  :bar:  puppy
  :END:

#+BEGIN_SRC emacs-lisp :var alist=3f78f08a-ccca-4fc0-aba9-2a192f7a0e5a

And in the block, the "alist" variable would look like '(:foo 5 :bar
"puppy").

What would be even better would be to run a tags search on matching
headlines and feed all property drawers into a single block, as a list
of alists. Just thinking out loud...

E




reply via email to

[Prev in Thread] Current Thread [Next in Thread]