emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Evaluating simple inline expressions in org-mode


From: H. Dieter Wilhelm
Subject: Re: [O] Evaluating simple inline expressions in org-mode
Date: Sun, 07 Feb 2016 16:45:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

>>> works as well.  I'm not sure how you define variables in calc however...
>>
>> You could write something like src_calc[:var x=3.41]{2*x} :-)
>
> Yes but can you save a variable for use in a later expression?

Well, at the moment I don't know another way as defining the calc
variables on the lisp level:

#+BEGIN_SRC emacs-lisp
(setq var-foo 9.81
      var-x 3.14
      var-bar ...)
#+END_SRC

Note: `var-' is a special prefix for the calc variables `foo', `x',
...

And then something like

  src_calc{2*x}

is working.

-- 
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany




reply via email to

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