Function: org-babel-result-cond

org-babel-result-cond is a macro defined in ob-core.el.gz.

Signature

(org-babel-result-cond RESULT-PARAMS SCALAR-FORM &rest TABLE-FORMS)

Documentation

Call the code to parse raw string results according to RESULT-PARAMS.

Do nothing with :results discard. Execute SCALAR-FORM when result should be treated as a string. Execute TABLE-FORMS when result should be considered sexp and parsed.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-core.el.gz
(defmacro org-babel-result-cond (result-params scalar-form &rest table-forms)
  "Call the code to parse raw string results according to RESULT-PARAMS.
Do nothing with :results discard.
Execute SCALAR-FORM when result should be treated as a string.
Execute TABLE-FORMS when result should be considered sexp and parsed."
  (declare (indent 1) (debug t))
  (org-with-gensyms (params)
    `(let ((,params ,result-params))
       (unless (member "discard" ,params)
         (if (or (member "scalar" ,params)
                 (member "verbatim" ,params)
                 (member "html" ,params)
                 (member "code" ,params)
                 (member "pp" ,params)
                 (member "file" ,params)
                 (and (or (member "output" ,params)
			  (member "raw"    ,params)
			  (member "org"    ,params)
			  (member "drawer" ,params))
		      (not (member "table" ,params))))
	     ,scalar-form
	   ,@table-forms)))))