Mercurial > emacs
comparison doc/misc/calc.texi @ 95084:12793e6721a0
(Calc Summary): Mention register commands.
(Saving Into Registers, Inserting From Registers): New sections.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Sun, 18 May 2008 21:15:51 +0000 |
parents | df72d7bb5d67 |
children | eafbd7a5c9be |
comparison
equal
deleted
inserted
replaced
95083:28fc0a8a4b45 | 95084:12793e6721a0 |
---|---|
28176 former will simply leave the formula @samp{a} on the stack whereas the | 28176 former will simply leave the formula @samp{a} on the stack whereas the |
28177 latter will produce an error message. | 28177 latter will produce an error message. |
28178 | 28178 |
28179 @kindex r 0-9 | 28179 @kindex r 0-9 |
28180 The @kbd{r} prefix may be followed by a digit, so that @kbd{r 9} is | 28180 The @kbd{r} prefix may be followed by a digit, so that @kbd{r 9} is |
28181 equivalent to @kbd{s r 9}. (The @kbd{r} prefix is otherwise unused | 28181 equivalent to @kbd{s r 9}. |
28182 in the current version of Calc.) | |
28183 | 28182 |
28184 @node Operations on Variables, Let Command, Recalling Variables, Store and Recall | 28183 @node Operations on Variables, Let Command, Recalling Variables, Store and Recall |
28185 @section Other Operations on Variables | 28184 @section Other Operations on Variables |
28186 | 28185 |
28187 @noindent | 28186 @noindent |
29208 work with Calc from a regular editing buffer. @xref{Embedded Mode}. | 29207 work with Calc from a regular editing buffer. @xref{Embedded Mode}. |
29209 | 29208 |
29210 @menu | 29209 @menu |
29211 * Killing From Stack:: | 29210 * Killing From Stack:: |
29212 * Yanking Into Stack:: | 29211 * Yanking Into Stack:: |
29212 * Saving Into Registers:: | |
29213 * Inserting From Registers:: | |
29213 * Grabbing From Buffers:: | 29214 * Grabbing From Buffers:: |
29214 * Yanking Into Buffers:: | 29215 * Yanking Into Buffers:: |
29215 * X Cut and Paste:: | 29216 * X Cut and Paste:: |
29216 @end menu | 29217 @end menu |
29217 | 29218 |
29253 @kbd{C-k} command. Although a whole line is always deleted, @kbd{C-k} | 29254 @kbd{C-k} command. Although a whole line is always deleted, @kbd{C-k} |
29254 with no argument copies only the number itself into the kill ring, whereas | 29255 with no argument copies only the number itself into the kill ring, whereas |
29255 @kbd{C-k} with a prefix argument of 1 copies the number with its trailing | 29256 @kbd{C-k} with a prefix argument of 1 copies the number with its trailing |
29256 newline. | 29257 newline. |
29257 | 29258 |
29258 @node Yanking Into Stack, Grabbing From Buffers, Killing From Stack, Kill and Yank | 29259 @node Yanking Into Stack, Saving Into Registers, Killing From Stack, Kill and Yank |
29259 @section Yanking into the Stack | 29260 @section Yanking into the Stack |
29260 | 29261 |
29261 @noindent | 29262 @noindent |
29262 @kindex C-y | 29263 @kindex C-y |
29263 @pindex calc-yank | 29264 @pindex calc-yank |
29272 full 3.14159, even though yanking it into any other buffer would yank the | 29273 full 3.14159, even though yanking it into any other buffer would yank the |
29273 number in its displayed form, 3.142. (Since the default display modes | 29274 number in its displayed form, 3.142. (Since the default display modes |
29274 show all objects to their full precision, this feature normally makes no | 29275 show all objects to their full precision, this feature normally makes no |
29275 difference.) | 29276 difference.) |
29276 | 29277 |
29277 @node Grabbing From Buffers, Yanking Into Buffers, Yanking Into Stack, Kill and Yank | 29278 @node Saving Into Registers, Inserting From Registers, Yanking Into Stack, Kill and Yank |
29279 @section Saving into Registers | |
29280 | |
29281 @noindent | |
29282 @kindex r s | |
29283 @pindex calc-copy-to-register | |
29284 @pindex calc-prepend-to-register | |
29285 @pindex calc-append-to-register | |
29286 @cindex Registers | |
29287 An alternative to killing and yanking stack entries is using | |
29288 registers in Calc. Saving stack entries in registers is like | |
29289 saving text in normal Emacs registers; although, like Calc's kill | |
29290 commands, register commands always operate on whole stack | |
29291 entries. | |
29292 | |
29293 Registers in Calc are places to store stack entries for later use; | |
29294 each register is indexed by a single character. To store the current | |
29295 region (rounded up, of course, to include full stack entries) into a | |
29296 register, use the command @kbd{r s} (@code{calc-copy-to-register}). | |
29297 You will then be prompted for a register to use, the next character | |
29298 you type will be the index for the register. To store the region in | |
29299 register @var{r}, the full command will be @kbd{r s @var{r}}. With an | |
29300 argument, @kbd{C-u r s @var{r}}, the region being copied to the | |
29301 register will be deleted from the Calc buffer. | |
29302 | |
29303 It is possible to add additional stack entries to a register. The | |
29304 command @kbd{M-x calc-append-to-register} will prompt for a register, | |
29305 then add the stack entries in the region to the end of the register | |
29306 contents. The command @kbd{M-x calc-prepend-to-register} will | |
29307 similarly prompt for a register and add the stack entries in the | |
29308 region to the beginning of the register contents. Both commands take | |
29309 @kbd{C-u} arguments, which will cause the region to be deleted after being | |
29310 added to the register. | |
29311 | |
29312 @node Inserting From Registers, Grabbing From Buffers, Saving Into Registers, Kill and Yank | |
29313 @section Inserting from Registers | |
29314 @noindent | |
29315 @kindex r i | |
29316 @pindex calc-insert-register | |
29317 The command @kbd{r i} (@code{calc-insert-register}) will prompt for a | |
29318 register, then insert the contents of that register into the | |
29319 Calculator. If the contents of the register were placed there from | |
29320 within Calc, then the full internal structure of the contents will be | |
29321 inserted into the Calculator, otherwise whatever text is in the | |
29322 register is reparsed and then inserted into the Calculator. | |
29323 | |
29324 @node Grabbing From Buffers, Yanking Into Buffers, Inserting From Registers, Kill and Yank | |
29278 @section Grabbing from Other Buffers | 29325 @section Grabbing from Other Buffers |
29279 | 29326 |
29280 @noindent | 29327 @noindent |
29281 @kindex C-x * g | 29328 @kindex C-x * g |
29282 @pindex calc-grab-region | 29329 @pindex calc-grab-region |
35608 @r{ @: m R @: @: 12,13 @:calc-mode-record-mode@:} | 35655 @r{ @: m R @: @: 12,13 @:calc-mode-record-mode@:} |
35609 @r{ @: m S @: @: 12 @:calc-shift-prefix@:} | 35656 @r{ @: m S @: @: 12 @:calc-shift-prefix@:} |
35610 @r{ @: m U @: @: 12 @:calc-units-simplify-mode@:} | 35657 @r{ @: m U @: @: 12 @:calc-units-simplify-mode@:} |
35611 | 35658 |
35612 @c | 35659 @c |
35660 @r{ @: r s @:register @: 27 @:calc-copy-to-register@:} | |
35661 @r{ @: r i @:register @: @:calc-insert-register@:} | |
35662 | |
35663 @c | |
35613 @r{ @: s c @:var1, var2 @: 29 @:calc-copy-variable@:} | 35664 @r{ @: s c @:var1, var2 @: 29 @:calc-copy-variable@:} |
35614 @r{ @: s d @:var, decl @: @:calc-declare-variable@:} | 35665 @r{ @: s d @:var, decl @: @:calc-declare-variable@:} |
35615 @r{ @: s e @:var, editing @: 29,30 @:calc-edit-variable@:} | 35666 @r{ @: s e @:var, editing @: 29,30 @:calc-edit-variable@:} |
35616 @r{ @: s i @:buffer @: @:calc-insert-variables@:} | 35667 @r{ @: s i @:buffer @: @:calc-insert-variables@:} |
35617 @r{ @: s k @:const, var @: 29 @:calc-copy-special-constant@:} | 35668 @r{ @: s k @:const, var @: 29 @:calc-copy-special-constant@:} |