[Top][All Lists]

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

Re: [O] Another tricky question: accessing named values

From: Christian Moe
Subject: Re: [O] Another tricky question: accessing named values
Date: Fri, 14 Sep 2012 11:24:46 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120824 Thunderbird/15.0


You could just call the named block from inline:

: value equals call_myval()[:results raw]

The `:results raw' argument should take care of the formatting.

No macros needed. But if you want to use macros, e.g. because the call lines get very long, or you want to add fancy formatting around the result of each calculation (not what you're looking for here, I think), you could write a macro to expand to a call_<name>() expression.


On 9/14/12 10:52 AM, Neuwirth Erich wrote:
Define a name with a value

#+name: myval
#+begin_src elisp :exports both
(+ 1 2)

The named value can be accessed in another code block

#+begin_src elisp :session*elisp*  :var myval2=myval :exports both
(setq myval3 myval2)

I can also (with some trickery as shown above)
use the value in running text: value equals

One of the minor annoyances here is that output of the inline src
is always put between equals signs, and in some cases I would like the same
formatting as the surrounding text.

reply via email to

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