Hi Taru, Babel can be used for storing and manipulating values of variables, and Babel already has a syntax for referencing these things inline in an Org-mode buffer using inline code blocks.
The syntax of an inline code block is src_lang[optional header arguments]{code body} The following property can be used to to ensure that all of your inline blocks are evaluated in the same session #+property: session *R* then you can use any programming language which your system supports to handle the variable assignment and manipulation (R is used below). e.g. : foo is src_R{foo <- 1+3} and bar is src_R{bar <- foo+3} would export to : foo is 4 and bar is 7 There is currently no support for replacing a code block with an overlay of it's results, but such a function may not be too difficult to write. Take a look at the `org-babel-open-src-block-result' function which has related functionality. This would be a generally useful feature -- the ability to replace all code blocks in a buffer with an overlay of their results (possibly with some colored background indicating that the results are actually the product of a code block). I'm interested to see what you come up with -- Eric Taru Karttunen <tar...@taruti.net> writes: > Hello > > I am looking for an org-mode solution to storing a number of variables and > referencing them nicely in an org-mode buffer. > > I would like to write something like this: > "{foo:1+3} and {bar:foo+3}" > and have it displayed (with overlays) as: > "foo:4 and bar:7" > > Any ideas how to hack org and babel to do this. Simple numeric > operations suffice but I have a few dozen variables so an easy > an intuitive interface is the most important aspect. > > - Taru Karttunen > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode