I got excited about Calc's power as an embedded mode. Define some variables in natural inline notation and then do operations on them.

But the execution seems a bit messy: you got a separate key bindings when you're in CalcEmbed mode and mistakes are easy to make.

Can the mode be tamed so that the following org-mode buffer:

* Calc test embed!

Let $foo := 342$ and $bar := 2.2$. Now $foo*bar => $!

Could be evaluated to

* Calc test embed!

Let $foo := 342$ and $bar := 2.2$. Now $foo*bar => 752.4$!

With a single key stroke, all the while remaining in org-mode?


Maybe not a single keystroke but you could activate embedded mode via C-x * a and then (while point is in, say, the first expression) update all calc expressions with C-x * u. I use embedded mode all the time and it's one of the most understated features of Emacs!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.