summaryrefslogtreecommitdiffstats
path: root/src/doc
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc')
-rwxr-xr-xsrc/doc22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/doc b/src/doc
index fc885ed..d10f501 100755
--- a/src/doc
+++ b/src/doc
@@ -414,7 +414,7 @@ Commands for handling cell content:
file (.md, mkd, .markdown), an xlsx or xls file.
If loading a csv, tab or tsv file and
- 'import_delimited_as_text' configuration variable is set
+ 'import_delimited_to_text' configuration variable is set
Sc-im will import numbers as text.
If loading an xlsx file and 'xlsx_readformulas' is set, Sc-im
@@ -1682,14 +1682,20 @@ Commands for handling cell content:
Executes a "luascript". Using Lua script, sc-im can be extend with lot
new functionality, such as complex programming, accessing databases
etc.
+
+ Two global variables {r} and {c} are injected in the "luascript". The
+ variables denote the row and column of the calling cell respectively.
+
The second parameter {i} is 0 or 1 indicating if the reference to this
- cell should be added to the formula evaluation graph.
- Setting it to 0 may be a good idea if you call sc.lquery to often in
- your scripts.
+ cell should be added to the formula evaluation graph. Setting it to 0
+ may be a good idea if you call sc.lquery to often in your scripts.
However, in the cases were its not added to the dependency graph, it
will nevertheless be executed when the cell that calls the script
executions is referenced by another cell.
+ The return of value of the "luascript" is inserted in the calling
+ cell if it is a string.
+
The search patch for LUA scripts files is $PWD/lua/
$HOME/.sc-im/lua/ or /usr/local/share/sc-im/lua (in that order)
@@ -1786,6 +1792,12 @@ Commands for handling cell content:
==============================================================================
&Other functions&
+ @myrow
+ references current row
+
+ @mycol
+ references current column
+
@if({expr}, {expr}, {expr})
Conditional: If the first expression is true then the value of
the second is returned, otherwise the value of the third.
@@ -1936,7 +1948,7 @@ Commands for handling cell content:
'LET A0=1' is the same as 'let A0=1'
Almost every interactive sc-im command is available for non-interactive
- scripting. Search the equivelent interactive commands for usage
+ scripting. Search the equivalent interactive commands for usage
information.
sc-im has these commands for available for external scripts.