@@ -187,6 +187,14 @@ the end-points, e.g.:
187187(The @code {apply } is necessary because @code {ses-range } produces a
188188@emph {list } of values. This allows for more complex possibilities.)
189189
190+ Alternatively you can use the @code {! } modifier of @code {ses-range } to
191+ remove blank cells which allows to use @code {+ } instead of
192+ @code {ses+ }:
193+
194+ @lisp
195+ (apply '+ (ses-range A2 A5 !))
196+ @end lisp
197+
190198@c ===================================================================
191199
192200@node The Basics
@@ -595,8 +603,8 @@ Pops up a menu to set the current row as the header, or revert to
595603column letters.
596604@item M-x ses-rename-cell
597605@findex ses-rename-cell
598- Rename a cell from a standard A1-like name to any
599- string .
606+ Rename a cell from a standard A1-like name to any string that can be a
607+ valid local variable name (See also @ref { Nonrelocatable references }) .
600608@item M-x ses-repair-cell-reference-all
601609@findex ses-repair-cell-reference-all
602610When you interrupt a cell formula update by clicking @kbd {C-g }, then
@@ -791,8 +799,17 @@ are some useful functions to call from your formulas:
791799
792800@table @code
793801@item (ses-delete-blanks &rest @var {args })
794- Returns a list from which all blank cells (value is either @code {nil } or
795- '*skip*) have been deleted.
802+ Returns a list from which all blank cells (value is either @code {nil }
803+ or '*skip*) have been deleted. Order of args is reverted. Please note
804+ that @code {ses-range } has a @code {! } modifier that allows to remove
805+ blanks, so it is possible to write:
806+ @lisp
807+ (ses-range A1 A5 !)
808+ @end lisp
809+ instead of
810+ @lisp
811+ (apply 'ses-delete-blanks (ses-range A1 A5 < ))
812+ @end lisp
796813
797814@item (ses+ &rest @var {args })
798815Sum of non-blank arguments.
@@ -842,9 +859,9 @@ this to undo the effect of @kbd{t}.
842859@end table
843860
844861When a printer function signals an error, the fallback printer
845- @samp {"%s " } is substituted. This is useful when your column printer
862+ @samp {"%S " } is substituted. This is useful when your column printer
846863is numeric-only and you use a string as a cell value. Note that the
847- standard default printer is `` %.7g'' which is numeric-only, so cells
864+ standard default printer is @samp { " %.7g" } which is numeric-only, so cells
848865that are empty of contain strings will use the fallback printer.
849866@kbd {c } on such cells will display ``Format specifier doesn't match
850867argument type''.
@@ -986,15 +1003,27 @@ can type ahead without worrying about the glitch.
9861003@kbd {C-u C-y } relocates none of the cell-references. What about mixed
9871004cases?
9881005
989- You can use
1006+ The best way is to rename cells that you do not want to be relocatable
1007+ by using @code {ses-rename-cell }.
1008+ @findex ses-rename-cell
1009+ Cells that do not have an A1-like name style are not relocated on
1010+ yank. Using this method, the concerned cells won't be relocated
1011+ whatever formula they appear in. Please note however that when a
1012+ formula contains some range @code {(ses-range @var {cell1 } @var {cell2 }) }
1013+ then in the yanked formula each range bound @var {cell1 } and
1014+ @var {cell2 } are relocated, or not, indepently, depending on whether
1015+ they are A1-like or renamed.
1016+
1017+ An alternative method is to use
9901018@lisp
9911019(symbol-value 'B3 )
9921020@end lisp
9931021to make an @dfn {absolute reference }. The formula relocator skips over
9941022quoted things, so this will not be relocated when pasted or when
9951023rows/columns are inserted/deleted. However, B3 will not be recorded
9961024as a dependency of this cell, so this cell will not be updated
997- automatically when B3 is changed.
1025+ automatically when B3 is changed, this is why using
1026+ @code {ses-rename-cell } is most of the time preferable.
9981027
9991028The variables @code {row } and @code {col } are dynamically bound while a
10001029cell formula is being evaluated. You can use
@@ -1011,12 +1040,13 @@ kind of dependency is also not recorded.
10111040@findex ses-reconstruct-all
10121041
10131042Begins with an 014 character, followed by sets of cell-definition
1014- macros for each row, followed by column-widths, column-printers,
1043+ macros for each row, followed by the set of local printer
1044+ defintitions, followed by column-widths, column-printers,
10151045default-printer, and header-row. Then there's the global parameters
1016- (file-format ID, numrows, numcols) and the local variables (specifying
1017- @acronym {SES } mode for the buffer, etc.).
1046+ (file-format ID, row count, column count, local printer count) and the
1047+ local variables (specifying @acronym {SES } mode for the buffer, etc.).
10181048
1019- When a @acronym {SES } file is loaded, first the numrows and numcols values are
1049+ When a @acronym {SES } file is loaded, first the global parameters are
10201050loaded, then the entire data area is @code {eval }ed, and finally the local
10211051variables are processed.
10221052
0 commit comments