Go to the first, previous, next, last section, table of contents.

Other M-# Commands

Two more Calc-related commands are M-# g and M-# r, which "grab" data from a selected region of a buffer into the Calculator. The region is defined in the usual Emacs way, by a "mark" placed at one end of the region, and the Emacs cursor or "point" placed at the other.

The M-# g command reads the region in the usual left-to-right, top-to-bottom order. The result is packaged into a Calc vector of numbers and placed on the stack. Calc (in its standard user interface) is then started. Type v u if you want to unpack this vector into separate numbers on the stack. Also, C-u M-# g interprets the region as a single number or formula.

The M-# r command reads a rectangle, with the point and mark defining opposite corners of the rectangle. The result is a matrix of numbers on the Calculator stack.

Complementary to these is M-# y, which "yanks" the value at the top of the Calc stack back into an editing buffer. If you type M-# y while in such a buffer, the value is yanked at the current position. If you type M-# y while in the Calc buffer, Calc makes an educated guess as to which editing buffer you want to use. The Calc window does not have to be visible in order to use this command, as long as there is something on the Calc stack.

Here, for reference, is the complete list of M-# commands. The shift, control, and meta keys are ignored for the keystroke following M-#.

Commands for turning Calc on and off:

#
Turn Calc on or off, employing the same user interface as last time.
C
Turn Calc on or off using its standard bottom-of-the-screen interface. If Calc is already turned on but the cursor is not in the Calc window, move the cursor into the window.
O
Same as C, but don't select the new Calc window. If Calc is already turned on and the cursor is in the Calc window, move it out of that window.
B
Control whether M-# c and M-# k use the full screen.
Q
Use Quick Mode for a single short calculation.
K
Turn Calc Keypad mode on or off.
E
Turn Calc Embedded mode on or off at the current formula.
J
Turn Calc Embedded mode on or off, select the interesting part.
W
Turn Calc Embedded mode on or off at the current word (number).
Z
Turn Calc on in a user-defined way, as defined by a Z I command.
X
Quit Calc; turn off standard, Keypad, or Embedded mode if on. (This is like q or OFF inside of Calc.)

Commands for moving data into and out of the Calculator:

G
Grab the region into the Calculator as a vector.
R
Grab the rectangular region into the Calculator as a matrix.
:
Grab the rectangular region and compute the sums of its columns.
_
Grab the rectangular region and compute the sums of its rows.
Y
Yank a value from the Calculator into the current editing buffer.

Commands for use with Embedded Mode:

A
"Activate" the current buffer. Locate all formulas that contain `:=' or `=>' symbols and record their locations so that they can be updated automatically as variables are changed.
D
Duplicate the current formula immediately below and select the duplicate.
F
Insert a new formula at the current point.
N
Move the cursor to the next active formula in the buffer.
P
Move the cursor to the previous active formula in the buffer.
U
Update (i.e., as if by the = key) the formula at the current point.
`
Edit (as if by calc-edit) the formula at the current point.

Miscellaneous commands:

I
Run the Emacs Info system to read the Calc manual. (This is the same as h i inside of Calc.)
T
Run the Emacs Info system to read the Calc Tutorial.
S
Run the Emacs Info system to read the Calc Summary.
L
Load Calc entirely into memory. (Normally the various parts are loaded only as they are needed.)
M
Read a region of written keystroke names (like `C-n a b c RET') and record them as the current keyboard macro.
0
(This is the "zero" digit key.) Reset the Calculator to its default state: Empty stack, and default mode settings. With any prefix argument, reset everything but the stack.

Go to the first, previous, next, last section, table of contents.