An opinionated Transient-based user interface to support the casual usage of Emacs Calc.
Casual Calc is available on MELPA.
If installed via list-packages
then add this line to your Emacs initialization file.
(require 'casual-calc) ; optional if using autoloaded menu
(keymap-set calc-mode-map "C-o" #'casual-calc-tmenu)
(keymap-set calc-alg-map "C-o" #'casual-calc-tmenu)
- Invoke
M-x calc
to launch Calc. - When the point is in the Calc window, invoke
C-o
(or a binding of your choosing) to launch the Casual Calc interface.
Once raised, the Casual Calc interface can be dismissed via:
C-g
to dismiss the current menu.C-q
to dismiss the interface completely.
For nearly all menus, algebraic entry via the ’ binding is available, as well as basic calculator operations (addition, subtraction, multiplication, division) and stack operations (pop, enter).
It helps to know some basics about Calc.
- Calc is a stack-based calculator that supports both RPN and algebraic style entry.
- By default it uses RPN entry, but this can be changed to algebraic.
- Stack based operations are always RPN-style.
- Undo has the keybinding
U
, redo isD
. - The top of the stack is referred to as
1:
- Calc vectors are punctuated with
[
and]
(e.g.[2 3]
) Matrix values are represented as vectors within a vector. For example,[[1 0] [0 1]]
is a square diagonal matrix. - Calc vector indexes are 1-offset.
- Intervals
- Inclusive intervals are represented as [𝑛..𝑚], where 𝑛 < 𝑚.
- Exclusive intervals are represented as (𝑛..𝑚), where 𝑛 < 𝑚.
- Any combination of lower and upper bounds set to be inclusive or exclusive is supported.
- Complex numbers are entered as (𝑟, 𝑖), where 𝑟 is the real part and 𝑖 is the imaginary.
- Radix numbers are entered as 𝑏#𝑛 where 𝑏 is the base value and 𝑛 is the number. For example entering
2#0101
will put5
on the stack. - H:M:S values are default entered as ℎ@ 𝑚” 𝑠’.
- Org-mode active timestamps can be entered into Calc.
- The top of the stack (1:) can be edited by pressing the
`
key. - Entering a single quote (‘) will prompt you for an algebraic entry.
If you enjoy using Casual Calc, consider making a modest financial contribution to help support its development and maintenance.