branch: externals/org commit 85ebb6d422f0508032c29bfea5329210d0e48b1b Author: Ihor Radchenko <yanta...@posteo.net> Commit: Ihor Radchenko <yanta...@posteo.net>
* lisp/ob-org.el: Document all the function arguments (org-babel-expand-body:org): Add docstring. (org-babel-execute:org): Explain all the arguments and describe what execution of Org body means. --- lisp/ob-org.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ob-org.el b/lisp/ob-org.el index 1bf02b461c..30edd994e4 100644 --- a/lisp/ob-org.el +++ b/lisp/ob-org.el @@ -45,6 +45,8 @@ "Default header inserted during export of org blocks.") (defun org-babel-expand-body:org (body params) + "Expand Org BODY according to PARAMS. +$VAR instances are replaced by VAR values defined in PARAMS." (dolist (var (org-babel--get-vars params)) (setq body (replace-regexp-in-string (regexp-quote (format "$%s" (car var))) @@ -53,7 +55,9 @@ body) (defun org-babel-execute:org (body params) - "Execute a block of Org code with. + "Execute a Org BODY according to PARAMS. +The BODY is returned expanded as is or exported, if PARAMS define +latex/html/ascii result type. This function is called by `org-babel-execute-src-block'." (let ((result-params (split-string (or (cdr (assq :results params)) ""))) (body (org-babel-expand-body:org