Select arithmetic operation e.g. 2 + 2 eval and echo result in the minibuffer

33 views Asked by At

I have an org file with lots of tables containing simple arithmetic values like "2 + 2", "1 + 2 + 3", "3 * 4"(notice - no elisp here) that I want to keep as is, without transforming into corresponding arithmetic results(for transparency/visibility reasons).

But I would like to find a way to quickly select any cell/arithmetic operation and get its result(ideally in popup/separate minibuffer).

Is it possible?

Basically it's a combination of (calculator) but in non-iterative way using the selected region.

1

There are 1 answers

0
Nikita Fedyashev On

I was able to a function that does exactly that

(calc-grab-region)

Parse the region as a vector of numbers and push it on the Calculator stack.