emacs-orgmode
[Top][All Lists]
Advanced

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

Re: LIterate programming with calc (help)


From: Fraga, Eric
Subject: Re: LIterate programming with calc (help)
Date: Mon, 31 Oct 2022 09:54:02 +0000
User-agent: Gnus/5.13 (Gnus v5.13)

On Monday, 31 Oct 2022 at 09:23, Ihor Radchenko wrote:
> I looked into ob-calc and it looks like the way to define variables is
> via :var header argument.

Indeed.  Something like :var a="300 m" does work.

> I guess that the main problem is that calc is tightly integrated with
> interactive commands. Maybe ob-calc could be extended to somehow
> indicate the commands to be executed in addition to inputting stack
> entries.
>
> Not sure if there is much interest in such feature though.

Thinking out loud, what would be better, but I have no idea how feasible
it would be, would be to have ob-calc make use of the embedded calc
functionality and syntax, so that you could write something like this:

#+begin_src calc
a := 300 m
b := 2 a =>
#+end_src

which would output the result of any line with => on it.

-- 
: Eric S Fraga, with org release_9.5.5-1028-gcd835d in Emacs 29.0.50


reply via email to

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