Mercurial > emacs
comparison man/ses.texi @ 60140:3f04dc96bdc4
ses.texi: Add concept/function/variable indices
author | Jonathan Yavner <jyavner@member.fsf.org> |
---|---|
date | Fri, 18 Feb 2005 05:48:09 +0000 |
parents | b1ae5333057a |
children | df65ae1d9d1b bf0d492ea2d5 |
comparison
equal
deleted
inserted
replaced
60139:cf2460efae4d | 60140:3f04dc96bdc4 |
---|---|
6 @c %**end of header | 6 @c %**end of header |
7 | 7 |
8 @copying | 8 @copying |
9 This file documents SES: the Simple Emacs Spreadsheet. | 9 This file documents SES: the Simple Emacs Spreadsheet. |
10 | 10 |
11 Copyright @copyright{} 2002 Free Software Foundation, Inc. | 11 Copyright @copyright{} 2002, 2005 Free Software Foundation, Inc. |
12 | 12 |
13 @quotation | 13 @quotation |
14 Permission is granted to copy, distribute and/or modify this document | 14 Permission is granted to copy, distribute and/or modify this document |
15 under the terms of the GNU Free Documentation License, Version 1.1 or | 15 under the terms of the GNU Free Documentation License, Version 1.1 or |
16 any later version published by the Free Software Foundation; with no | 16 any later version published by the Free Software Foundation; with no |
69 @menu | 69 @menu |
70 * Sales Pitch:: Why use SES? | 70 * Sales Pitch:: Why use SES? |
71 * The Basics:: Basic spreadsheet commands | 71 * The Basics:: Basic spreadsheet commands |
72 * Advanced Features:: Want to know more? | 72 * Advanced Features:: Want to know more? |
73 * For Gurus:: Want to know @emph{even more}? | 73 * For Gurus:: Want to know @emph{even more}? |
74 * Index:: Concept, Function and Variable Index | |
74 * Acknowledgements:: Acknowledgements | 75 * Acknowledgements:: Acknowledgements |
75 @end menu | 76 @end menu |
76 | 77 |
77 @c =================================================================== | 78 @c =================================================================== |
78 | 79 |
79 @node Sales Pitch, The Basics, Top, Top | 80 @node Sales Pitch, The Basics, Top, Top |
80 @comment node-name, next, previous, up | 81 @comment node-name, next, previous, up |
81 @chapter Sales Pitch | 82 @chapter Sales Pitch |
83 @cindex features | |
82 | 84 |
83 @itemize @bullet | 85 @itemize @bullet |
84 @item Create and edit simple spreadsheets with a minimum of fuss. | 86 @item Create and edit simple spreadsheets with a minimum of fuss. |
85 @item Full undo/redo/autosave. | 87 @item Full undo/redo/autosave. |
86 @item Immune to viruses in spreadsheet files. | 88 @item Immune to viruses in spreadsheet files. |
98 @c =================================================================== | 100 @c =================================================================== |
99 | 101 |
100 @node The Basics, Advanced Features, Sales Pitch, Top | 102 @node The Basics, Advanced Features, Sales Pitch, Top |
101 @comment node-name, next, previous, up | 103 @comment node-name, next, previous, up |
102 @chapter The Basics | 104 @chapter The Basics |
105 @cindex basic commands | |
106 @findex ses-jump | |
107 @findex ses-mark-row | |
108 @findex ses-mark-column | |
109 @findex ses-mark-whole-buffer | |
110 @findex set-mark-command | |
111 @findex keyboard-quit | |
103 | 112 |
104 A @dfn{cell identifier} is a symbol with a column letter and a row | 113 A @dfn{cell identifier} is a symbol with a column letter and a row |
105 number. Cell B7 is the 2nd column of the 7th row. For very wide | 114 number. Cell B7 is the 2nd column of the 7th row. For very wide |
106 spreadsheets, there are two column letters: cell AB7 is the 28th | 115 spreadsheets, there are two column letters: cell AB7 is the 28th |
107 column of the 7th row. | 116 column of the 7th row. |
145 * Customizing SES:: | 154 * Customizing SES:: |
146 @end menu | 155 @end menu |
147 | 156 |
148 @node Formulas, Resizing, The Basics, The Basics | 157 @node Formulas, Resizing, The Basics, The Basics |
149 @section Cell formulas | 158 @section Cell formulas |
159 @cindex formulas | |
160 @cindex formulas, entering | |
161 @findex ses-read-cell | |
162 @findex ses-read-symbol | |
163 @findex ses-edit-cell | |
164 @findex ses-recalculate-cell | |
165 @findex ses-recalculate-all | |
150 | 166 |
151 To enter a number into the current cell, just start typing: | 167 To enter a number into the current cell, just start typing: |
152 | 168 |
153 @table @kbd | 169 @table @kbd |
154 @item 0..9 | 170 @item 0..9 |
191 Recalculate the entire spreadsheet (@code{ses-recalculate-all}). | 207 Recalculate the entire spreadsheet (@code{ses-recalculate-all}). |
192 @end table | 208 @end table |
193 | 209 |
194 @node Resizing, Printer functions, Formulas, The Basics | 210 @node Resizing, Printer functions, Formulas, The Basics |
195 @section Resizing the spreadsheet | 211 @section Resizing the spreadsheet |
212 @cindex resizing spreadsheets | |
213 @findex ses-insert-row | |
214 @findex ses-insert-column | |
215 @findex ses-delete-row | |
216 @findex ses-delete-column | |
217 @findex ses-set-column-width | |
218 @findex ses-forward-or-insert | |
219 @findex ses-append-row-jump-first-column | |
220 | |
196 | 221 |
197 Basic commands: | 222 Basic commands: |
198 | 223 |
199 @table @kbd | 224 @table @kbd |
200 @item C-o | 225 @item C-o |
238 @end table | 263 @end table |
239 | 264 |
240 | 265 |
241 @node Printer functions, Clearing cells, Resizing, The Basics | 266 @node Printer functions, Clearing cells, Resizing, The Basics |
242 @section Printer functions | 267 @section Printer functions |
268 @cindex printer functions | |
269 @findex ses-read-cell-printer | |
270 @findex ses-read-column-printer | |
271 @findex ses-read-default-printer | |
272 @findex ses-center | |
273 @findex ses-center-span | |
274 @findex ses-dashfill | |
275 @findex ses-dashfill-span | |
276 @findex ses-tildefill-span | |
277 | |
243 | 278 |
244 Printer functions convert binary cell values into the print forms that | 279 Printer functions convert binary cell values into the print forms that |
245 Emacs will display on the screen. | 280 Emacs will display on the screen. |
246 | 281 |
247 A printer can be a format string, like @samp{"$%.2f"}. The result | 282 A printer can be a format string, like @samp{"$%.2f"}. The result |
293 @end table | 328 @end table |
294 | 329 |
295 | 330 |
296 @node Clearing cells, Copy/cut/paste, Printer functions, The Basics | 331 @node Clearing cells, Copy/cut/paste, Printer functions, The Basics |
297 @section Clearing cells | 332 @section Clearing cells |
333 @cindex clearing commands | |
334 @findex ses-clear-cell-backward | |
335 @findex ses-clear-cell-forward | |
298 | 336 |
299 These commands set both formula and printer to @code{nil}: | 337 These commands set both formula and printer to @code{nil}: |
300 | 338 |
301 @table @kbd | 339 @table @kbd |
302 @item DEL | 340 @item DEL |
307 @end table | 345 @end table |
308 | 346 |
309 | 347 |
310 @node Copy/cut/paste, Customizing SES, Clearing cells, The Basics | 348 @node Copy/cut/paste, Customizing SES, Clearing cells, The Basics |
311 @section Copy, cut, and paste | 349 @section Copy, cut, and paste |
350 @cindex copy | |
351 @cindex cut | |
352 @cindex paste | |
353 @findex kill-ring-save | |
354 @findex mouse-set-region | |
355 @findex mouse-set-secondary | |
356 @findex ses-kill-override | |
357 @findex yank | |
358 @findex clipboard-yank | |
359 @findex mouse-yank-at-click | |
360 @findex mouse-yank-at-secondary | |
361 @findex ses-yank-pop | |
312 | 362 |
313 The copy functions work on rectangular regions of cells. You can paste the | 363 The copy functions work on rectangular regions of cells. You can paste the |
314 copies into non-SES buffers to export the print text. | 364 copies into non-SES buffers to export the print text. |
315 | 365 |
316 @table @kbd | 366 @table @kbd |
370 yank. This doesn't make any difference? | 420 yank. This doesn't make any difference? |
371 @end table | 421 @end table |
372 | 422 |
373 @node Customizing SES, , Copy/cut/paste, The Basics | 423 @node Customizing SES, , Copy/cut/paste, The Basics |
374 @section Customizing SES | 424 @section Customizing SES |
425 @cindex customizing | |
426 @vindex enable-local-eval | |
427 @vindex ses-mode-hook | |
428 @vindex safe-functions | |
429 @vindex enable-local-eval | |
430 | |
375 | 431 |
376 By default, a newly-created spreadsheet has 1 row and 1 column. The | 432 By default, a newly-created spreadsheet has 1 row and 1 column. The |
377 column width is 7 and the default printer is @samp{"%.7g"}. Each of these | 433 column width is 7 and the default printer is @samp{"%.7g"}. Each of these |
378 can be customized. Look in group ``ses''. | 434 can be customized. Look in group ``ses''. |
379 | 435 |
401 | 457 |
402 @c =================================================================== | 458 @c =================================================================== |
403 | 459 |
404 @node Advanced Features, For Gurus, The Basics, Top | 460 @node Advanced Features, For Gurus, The Basics, Top |
405 @chapter Advanced Features | 461 @chapter Advanced Features |
462 @cindex advanced features | |
463 @findex ses-read-header-row | |
464 | |
406 | 465 |
407 @table @kbd | 466 @table @kbd |
408 @item C-c M-C-h | 467 @item C-c M-C-h |
409 (@code{ses-set-header-row}). The header line at the top of the SES | 468 (@code{ses-set-header-row}). The header line at the top of the SES |
410 window normally shows the column letter for each column. You can set | 469 window normally shows the column letter for each column. You can set |
428 * Spreadsheets with details and summary:: | 487 * Spreadsheets with details and summary:: |
429 @end menu | 488 @end menu |
430 | 489 |
431 @node The print area, Ranges in formulas, Advanced Features, Advanced Features | 490 @node The print area, Ranges in formulas, Advanced Features, Advanced Features |
432 @section The print area | 491 @section The print area |
492 @cindex print area | |
493 @findex widen | |
494 @findex ses-renarrow-buffer | |
495 @findex ses-reprint-all | |
433 | 496 |
434 A SES file consists of a print area and a data area. Normally the | 497 A SES file consists of a print area and a data area. Normally the |
435 buffer is narrowed to show only the print area. The print area is | 498 buffer is narrowed to show only the print area. The print area is |
436 read-only except for special SES commands; it contains cell values | 499 read-only except for special SES commands; it contains cell values |
437 formatted by printer functions. The data area records the formula and | 500 formatted by printer functions. The data area records the formula and |
450 (@code{ses-reprint-all}). | 513 (@code{ses-reprint-all}). |
451 @end table | 514 @end table |
452 | 515 |
453 @node Ranges in formulas, Sorting by column, The print area, Advanced Features | 516 @node Ranges in formulas, Sorting by column, The print area, Advanced Features |
454 @section Ranges in formulas | 517 @section Ranges in formulas |
518 @cindex ranges | |
519 @findex ses-insert-range-click | |
520 @findex ses-insert-range | |
521 @findex ses-insert-ses-range-click | |
522 @findex ses-insert-ses-range | |
523 @vindex from | |
524 @vindex to | |
455 | 525 |
456 A formula like | 526 A formula like |
457 @lisp | 527 @lisp |
458 (+ A1 A2 A3) | 528 (+ A1 A2 A3) |
459 @end lisp | 529 @end lisp |
503 the range. New cells inserted just before a range are not included. | 573 the range. New cells inserted just before a range are not included. |
504 | 574 |
505 | 575 |
506 @node Sorting by column, Standard formula functions, Ranges in formulas, Advanced Features | 576 @node Sorting by column, Standard formula functions, Ranges in formulas, Advanced Features |
507 @section Sorting by column | 577 @section Sorting by column |
578 @cindex sorting | |
579 @findex ses-sort-column | |
580 @findex ses-sort-column-click | |
508 | 581 |
509 @table @kbd | 582 @table @kbd |
510 @item C-c M-C-s | 583 @item C-c M-C-s |
511 Sort the cells of a range using one of the columns | 584 Sort the cells of a range using one of the columns |
512 (@code{ses-sort-column}). The rows (or partial rows if the range | 585 (@code{ses-sort-column}). The rows (or partial rows if the range |
529 range. | 602 range. |
530 | 603 |
531 | 604 |
532 @node Standard formula functions, More on cell printing, Sorting by column, Advanced Features | 605 @node Standard formula functions, More on cell printing, Sorting by column, Advanced Features |
533 @section Standard formula functions | 606 @section Standard formula functions |
607 @cindex standard formula functions | |
608 @cindex *skip* | |
609 @cindex *error* | |
610 @findex ses-delete-blanks | |
611 @findex ses-average | |
612 @findex ses+ | |
534 | 613 |
535 Oftentimes you want a calculation to exclude the blank cells. Here | 614 Oftentimes you want a calculation to exclude the blank cells. Here |
536 are some useful functions to call from your formulas: | 615 are some useful functions to call from your formulas: |
537 | 616 |
538 @table @code | 617 @table @code |
548 as a single argument, since you'll probably use it with @code{ses-range}. | 627 as a single argument, since you'll probably use it with @code{ses-range}. |
549 @end table | 628 @end table |
550 | 629 |
551 @node More on cell printing, Import and export, Standard formula functions, Advanced Features | 630 @node More on cell printing, Import and export, Standard formula functions, Advanced Features |
552 @section More on cell printing | 631 @section More on cell printing |
632 @cindex cell printing, more | |
633 @findex ses-truncate-cell | |
634 @findex ses-recalculate-cell | |
553 | 635 |
554 Special cell values: | 636 Special cell values: |
555 @itemize | 637 @itemize |
556 @item nil prints the same as "", but allows previous cell to spill over. | 638 @item nil prints the same as "", but allows previous cell to spill over. |
557 @item '*skip* replaces nil when the previous cell actually does spill over; | 639 @item '*skip* replaces nil when the previous cell actually does spill over; |
588 is numeric-only and you use a string as a cell value. | 670 is numeric-only and you use a string as a cell value. |
589 | 671 |
590 | 672 |
591 @node Import and export, Virus protection, More on cell printing, Advanced Features | 673 @node Import and export, Virus protection, More on cell printing, Advanced Features |
592 @section Import and export | 674 @section Import and export |
675 @cindex import and export | |
676 @cindex export, and import | |
677 @findex ses-export-tsv | |
678 @findex ses-export-tsf | |
593 | 679 |
594 @table @kbd | 680 @table @kbd |
595 @item x t | 681 @item x t |
596 Export a range of cells as tab-separated values (@code{ses-export-tsv}). | 682 Export a range of cells as tab-separated values (@code{ses-export-tsv}). |
597 @item x T | 683 @item x T |
604 To import text, use any of the yank commands where the text to paste | 690 To import text, use any of the yank commands where the text to paste |
605 contains tabs and/or newlines. Imported formulas are not relocated. | 691 contains tabs and/or newlines. Imported formulas are not relocated. |
606 | 692 |
607 @node Virus protection, Spreadsheets with details and summary, Import and export, Advanced Features | 693 @node Virus protection, Spreadsheets with details and summary, Import and export, Advanced Features |
608 @section Virus protection | 694 @section Virus protection |
695 @cindex virus protection | |
609 | 696 |
610 Whenever a formula or printer is read from a file or is pasted into | 697 Whenever a formula or printer is read from a file or is pasted into |
611 the spreadsheet, it receives a ``needs safety check'' marking. Later, | 698 the spreadsheet, it receives a ``needs safety check'' marking. Later, |
612 when the formula or printer is evaluated for the first time, it is | 699 when the formula or printer is evaluated for the first time, it is |
613 checked for safety using the @code{unsafep} predicate; if found to be | 700 checked for safety using the @code{unsafep} predicate; if found to be |
630 your style as a formula-writer. See the documentation in @file{unsafep.el} | 717 your style as a formula-writer. See the documentation in @file{unsafep.el} |
631 for more info on how Lisp forms are classified as safe or unsafe. | 718 for more info on how Lisp forms are classified as safe or unsafe. |
632 | 719 |
633 @node Spreadsheets with details and summary, , Virus protection, Advanced Features | 720 @node Spreadsheets with details and summary, , Virus protection, Advanced Features |
634 @section Spreadsheets with details and summary | 721 @section Spreadsheets with details and summary |
722 @cindex details and summary | |
723 @cindex summary, and details | |
635 | 724 |
636 A common organization for spreadsheets is to have a bunch of ``detail'' | 725 A common organization for spreadsheets is to have a bunch of ``detail'' |
637 rows, each perhaps describing a transaction, and then a set of | 726 rows, each perhaps describing a transaction, and then a set of |
638 ``summary'' rows that each show reduced data for some subset of the | 727 ``summary'' rows that each show reduced data for some subset of the |
639 details. SES supports this organization via the @code{ses-select} | 728 details. SES supports this organization via the @code{ses-select} |
662 details-and-summary spreadsheet. | 751 details-and-summary spreadsheet. |
663 | 752 |
664 | 753 |
665 @c =================================================================== | 754 @c =================================================================== |
666 | 755 |
667 @node For Gurus, Acknowledgements, Advanced Features, Top | 756 @node For Gurus, Index, Advanced Features, Top |
668 @chapter For Gurus | 757 @chapter For Gurus |
758 @cindex advanced features | |
669 | 759 |
670 @menu | 760 @menu |
671 * Deferred updates:: | 761 * Deferred updates:: |
672 * Nonrelocatable references:: | 762 * Nonrelocatable references:: |
673 * The data area:: | 763 * The data area:: |
675 * Uses of defadvice in SES:: | 765 * Uses of defadvice in SES:: |
676 @end menu | 766 @end menu |
677 | 767 |
678 @node Deferred updates, Nonrelocatable references, For Gurus, For Gurus | 768 @node Deferred updates, Nonrelocatable references, For Gurus, For Gurus |
679 @section Deferred updates | 769 @section Deferred updates |
770 @cindex deferred updates | |
771 @cindex updates, deferred | |
772 @vindex run-with-idle-timer | |
680 | 773 |
681 To save time by avoiding redundant computations, cells that need | 774 To save time by avoiding redundant computations, cells that need |
682 recalculation due to changes in other cells are added to a set. At | 775 recalculation due to changes in other cells are added to a set. At |
683 the end of the command, each cell in the set is recalculated once. | 776 the end of the command, each cell in the set is recalculated once. |
684 This can create a new set of cells that need recalculation. The | 777 This can create a new set of cells that need recalculation. The |
704 can type ahead without worrying about the glitch. | 797 can type ahead without worrying about the glitch. |
705 | 798 |
706 | 799 |
707 @node Nonrelocatable references, The data area, Deferred updates, For Gurus | 800 @node Nonrelocatable references, The data area, Deferred updates, For Gurus |
708 @section Nonrelocatable references | 801 @section Nonrelocatable references |
802 @cindex nonrelocatable references | |
803 @cindex references, nonrelocatable | |
709 | 804 |
710 @kbd{C-y} relocates all cell-references in a pasted formula, while | 805 @kbd{C-y} relocates all cell-references in a pasted formula, while |
711 @kbd{C-u C-y} relocates none of the cell-references. What about mixed | 806 @kbd{C-u C-y} relocates none of the cell-references. What about mixed |
712 cases? | 807 cases? |
713 | 808 |
730 kind of dependency is also not recorded. | 825 kind of dependency is also not recorded. |
731 | 826 |
732 | 827 |
733 @node The data area, Buffer-local variables in spreadsheets, Nonrelocatable references, For Gurus | 828 @node The data area, Buffer-local variables in spreadsheets, Nonrelocatable references, For Gurus |
734 @section The data area | 829 @section The data area |
830 @cindex data area | |
831 @findex ses-reconstruct-all | |
735 | 832 |
736 Begins with an 014 character, followed by sets of cell-definition | 833 Begins with an 014 character, followed by sets of cell-definition |
737 macros for each row, followed by column-widths, column-printers, | 834 macros for each row, followed by column-widths, column-printers, |
738 default-printer, and header-row. Then there's the global parameters | 835 default-printer, and header-row. Then there's the global parameters |
739 (file-format ID, numrows, numcols) and the local variables (specifying | 836 (file-format ID, numrows, numcols) and the local variables (specifying |
760 @end table | 857 @end table |
761 | 858 |
762 | 859 |
763 @node Buffer-local variables in spreadsheets, Uses of defadvice in SES, The data area, For Gurus | 860 @node Buffer-local variables in spreadsheets, Uses of defadvice in SES, The data area, For Gurus |
764 @section Buffer-local variables in spreadsheets | 861 @section Buffer-local variables in spreadsheets |
862 @cindex buffer-local variables | |
863 @cindex variables, buffer-local | |
765 | 864 |
766 You can add additional local variables to the list at the bottom of | 865 You can add additional local variables to the list at the bottom of |
767 the data area, such as hidden constants you want to refer to in your | 866 the data area, such as hidden constants you want to refer to in your |
768 formulas. | 867 formulas. |
769 | 868 |
792 (put 'your-function-name 'safe-function t) | 891 (put 'your-function-name 'safe-function t) |
793 @end lisp | 892 @end lisp |
794 | 893 |
795 @node Uses of defadvice in SES, , Buffer-local variables in spreadsheets, For Gurus | 894 @node Uses of defadvice in SES, , Buffer-local variables in spreadsheets, For Gurus |
796 @section Uses of defadvice in SES | 895 @section Uses of defadvice in SES |
896 @cindex defadvice | |
897 @cindex undo-more | |
898 @cindex copy-region-as-kill | |
899 @cindex yank | |
797 | 900 |
798 @table @code | 901 @table @code |
799 @item undo-more | 902 @item undo-more |
800 Defines a new undo element format (@var{fun} . @var{args}), which | 903 Defines a new undo element format (@var{fun} . @var{args}), which |
801 means ``undo by applying @var{fun} to @var{args}''. For spreadsheet | 904 means ``undo by applying @var{fun} to @var{args}''. For spreadsheet |
812 as cells (if the yank text has 'ses properties), then as tab-separated | 915 as cells (if the yank text has 'ses properties), then as tab-separated |
813 formulas, then (if all else fails) as a single formula for the current | 916 formulas, then (if all else fails) as a single formula for the current |
814 cell. | 917 cell. |
815 @end table | 918 @end table |
816 | 919 |
817 | |
818 @c =================================================================== | 920 @c =================================================================== |
819 | 921 @node Index, Acknowledgements, For Gurus, Top |
820 @node Acknowledgements, , For Gurus, Top | 922 @unnumbered Concept Index |
923 | |
924 @printindex cp | |
925 | |
926 @heading Function Index | |
927 | |
928 @printindex fn | |
929 | |
930 @heading Variable Index | |
931 | |
932 @printindex vr | |
933 | |
934 | |
935 @c =================================================================== | |
936 | |
937 @node Acknowledgements, , Index, Top | |
821 @chapter Acknowledgements | 938 @chapter Acknowledgements |
822 | 939 |
823 Coding by: | 940 Coding by: |
824 @quotation | 941 @quotation |
825 Jonathan Yavner @email{jyavner@@member.fsf.org}@* | 942 Jonathan Yavner @email{jyavner@@member.fsf.org}@* |
826 Stefan Monnier @email{monnier@@gnu.org} | 943 Stefan Monnier @email{monnier@@gnu.org} |
827 @end quotation | 944 @end quotation |
828 | 945 |
946 @noindent | |
947 Texinfo manual by: | |
948 @quotation | |
949 Jonathan Yavner @email{jyavner@@member.fsf.org}@* | |
950 Brad Collins <brad@@chenla.org> | |
951 @end quotation | |
952 | |
953 @noindent | |
829 Ideas from: | 954 Ideas from: |
830 @quotation | 955 @quotation |
831 Christoph Conrad @email{christoph.conrad@@gmx.de}@* | 956 Christoph Conrad @email{christoph.conrad@@gmx.de}@* |
832 CyberBob @email{cyberbob@@redneck.gacracker.org}@* | 957 CyberBob @email{cyberbob@@redneck.gacracker.org}@* |
833 Syver Enstad @email{syver-en@@online.no}@* | 958 Syver Enstad @email{syver-en@@online.no}@* |