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

2016-02-08 Thread Eric S Fraga
On Sunday, 7 Feb 2016 at 16:45, H. Dieter Wilhelm wrote: 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

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

2016-02-07 Thread H. Dieter Wilhelm
>>> 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

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

2016-02-04 Thread Eric S Fraga
On Thursday, 4 Feb 2016 at 08:01, H. Dieter Wilhelm wrote: > It must be src_calc{2*pi} though. Indeed. I mistyped. >> 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

[O] Evaluating simple inline expressions in org-mode

2016-02-03 Thread Gary Oberbrunner
I'd like to just have a few inline formulas evaluated in my org-mode document (I'm exporting to LaTeX if that matters). Something like this: = # a constant: # pi = 3.14159 The value of interest is {{{2*$pi}}}. = I want that to export as: The

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

2016-02-03 Thread Ken Mankoff
On 2016-02-03 at 08:45, Gary Oberbrunner wrote: > I'd like to just have a few inline formulas evaluated in my org-mode > document (I'm exporting to LaTeX if that matters). Something like this: > > = > # a constant: > # pi = 3.14159 > > The value of

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

2016-02-03 Thread Gary Oberbrunner
Thanks Ken, that works great! With session as a file property (#+PROPERTY: header-args:python :session foo) the inline expressions aren't even _all_ that verbose. And I can use arbitrary python, not just math. Very nice! On Wed, Feb 3, 2016 at 11:09 AM, Eric S Fraga wrote: >

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

2016-02-03 Thread Eric S Fraga
On Wednesday, 3 Feb 2016 at 08:45, Gary Oberbrunner wrote: [...] > Of course I made up that {{{}}} syntax, that's not a real thing. I've seen > org-mode tables with calc, but I'm hoping for something simpler, just > inline math expression eval. (I'm fine with elisp, calc, whatever.) As Ken has

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

2016-02-03 Thread H. Dieter Wilhelm
Eric S Fraga writes: > On Wednesday, 3 Feb 2016 at 08:45, Gary Oberbrunner wrote: > > [...] > >> Of course I made up that {{{}}} syntax, that's not a real thing. I've seen >> org-mode tables with calc, but I'm hoping for something simpler, just >> inline math expression eval.