summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2014-04-18 14:09:37 +0200
committerBastien Guerry <bzg@altern.org>2014-04-18 14:09:37 +0200
commit64eea693ae0c019463218a1102a38372addc29af (patch)
tree4e42d8710d61430d61538685e84bff256dc3dbf7
parent5807bfbed2cc8ef38143c2f60b7fd92971b23106 (diff)
downloadorg-mode-64eea693ae0c019463218a1102a38372addc29af.tar.gz
ob-table.el (org-sbe): Minor enhancements
* ob-table.el (org-sbe): Minor enhancements.
-rw-r--r--lisp/ob-table.el22
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/ob-table.el b/lisp/ob-table.el
index 831e352..6658313 100644
--- a/lisp/ob-table.el
+++ b/lisp/ob-table.el
@@ -62,23 +62,27 @@ character and replace it with ellipses."
(defmacro org-sbe (source-block &rest variables)
"Return the results of calling SOURCE-BLOCK with VARIABLES.
-Each element of VARIABLES should be a two
-element list, whose first element is the name of the variable and
-second element is a string of its value. The following call to
-`org-sbe' would be equivalent to the following source code block.
+
+Each element of VARIABLES should be a list of two elements: the
+first element is the name of the variable and second element is a
+string of its value.
+
+So this `org-sbe' construct
(org-sbe 'source-block (n $2) (m 3))
-#+begin_src emacs-lisp :var results=source-block(n=val_at_col_2, m=3) :results silent
-results
-#+end_src
+is the equivalent of the following source code block:
+
+ #+begin_src emacs-lisp :var results=source-block(n=val_at_col_2, m=3) :results silent
+ results
+ #+end_src
-NOTE: by default string variable names are interpreted as
+NOTE: By default, string variable names are interpreted as
references to source-code blocks, to force interpretation of a
cell's value as a string, prefix the identifier a \"$\" (e.g.,
\"$$2\" instead of \"$2\" or \"$@2$2\" instead of \"@2$2\").
-NOTE: it is also possible to pass header arguments to the code
+NOTE: It is also possible to pass header arguments to the code
block. In this case a table cell should hold the string value of
the header argument which can then be passed before all variables
as shown in the example below.