Perform math operations directly in the buffer. Great for macros.
(add-to-list 'load-path "/path/to/macro-math") (autoload 'macro-math-eval-and-round-region "macro-math" t nil) (autoload 'macro-math-eval-region "macro-math" t nil) (global-set-key "\C-x~" 'macro-math-eval-and-round-region) (global-set-key "\C-x=" 'macro-math-eval-region)
At any time, especially during macros, add an expression to the buffer and mark it. Then call `macro-math-eval-region' to get the result, for example:
5 + 3 (2 + 3) * 5 1/2 * pi
For example, use it to increase all numbers in a buffer by one. Call `kmacro-start-macro', move the point behind the next number, type "+ 1", mark the number and + 1, call `macro-math-eval-region'. Finish the macro with `kmacro-end-macro', then call it repeatedly.
If you have any feedback, please email me, or visit this package's page at the Emacs wiki.