sulami/literate-calc-mode.el

Possible feature: Anonymous calculation

pfif opened this issue · 1 comments

pfif commented

Potential Problem

Sometimes, when writing a literate-calc-mode file, I want to have the computer do a quick calculation for me. That calculation is not to stay in the final document.

pizzaPrice = 10 euros
deliveryPrice = 2 euros

pizzaPrice + (deliveryPrice / 3)

That last line would be an example of this "quick calculation". Problem: the program doesn't display the result of this line. I need to assign the result of this calculation to a temporary variable in order to get the result (before immediately deleting it).

Possible solutions

  • Display the result for any calculation in the file
  • Display the result any line that ends with a specific set of character, for instance "=>"
pfif commented

There is actually no need to set a variable, the line just need to contain equals. In order to fulfil the use case above, just input a = at the beginning of the line.

pizzaPrice = 10 euros
deliveryPrice = 2 euros

= pizzaPrice + (deliveryPrice / 3)