On Tue, 20 Jan 2015, Nicolas Goaziou wrote:

"Charles C. Berry" <ccbe...@ucsd.edu> writes:

This is probably the shortest path. I'd apprecaite it if you would
refactor that part.

I implemented `org-macro-escape-arguments' which can replace your
initial snippet:


Nicolas,

Thank you!

I attach 3 patches and a file of usage examples.

Any of `:results list', `:results table', multiline results (after stripping a trailing newline), and list results now generates an error.

Best,

Chuck

From b3e1998eb5592a74b7d8d91858bc2da8121d0bf5 Mon Sep 17 00:00:00 2001
From: chasberry <ccbe...@ucsd.edu>
Date: Wed, 21 Jan 2015 18:08:58 -0800
Subject: [PATCH 1/3] lisp/ox.el: Enable removable inline src results

* lisp/ox.el: (org-export-as): Treat `results' as an `identity' macro
  with one argument after Babel executes.
---
 lisp/ox.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 8880e10..3d5c7f2 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -2884,7 +2884,8 @@ Return code as a string."
                ;; EMAIL is not a parsed keyword: store it as-is.
                (cons "email" (or (plist-get info :email) ""))
                (cons "title"
-                     (org-element-interpret-data (plist-get info :title))))
+                     (org-element-interpret-data (plist-get info :title)))
+               (cons "results" "$1"))
          'finalize)
         ;; Parse buffer.
         (setq tree (org-element-parse-buffer nil visible-only))
-- 
1.9.3 (Apple Git-50)

From 8598049ee8f581b0866693c861b0905ef158b951 Mon Sep 17 00:00:00 2001
From: chasberry <ccbe...@ucsd.edu>
Date: Wed, 21 Jan 2015 18:12:51 -0800
Subject: [PATCH 2/3] ob-exp.el: Enable removal of {{{results(...)}}}

* ob-exp.el (org-babel-exp-do-export): `clean' lambda form removes inline
  results wrapped in `results{{{(' `)}}}' by calling
  `org-babel-remove-inline-result'.
---
 lisp/ob-exp.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index edb889c..afe6cd9 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -315,7 +315,9 @@ The function respects the value of the :exports header 
argument."
   (let ((silently (lambda () (let ((session (cdr (assoc :session (nth 2 
info)))))
                               (when (not (and session (equal "none" session)))
                                 (org-babel-exp-results info type 'silent)))))
-       (clean (lambda () (unless (eq type 'inline) (org-babel-remove-result 
info)))))
+       (clean (lambda () (if (eq type 'inline)
+                             (org-babel-remove-inline-result info)
+                           (org-babel-remove-result info)))))
     (case (intern (or (cdr (assoc :exports (nth 2 info))) "code"))
       ('none (funcall silently) (funcall clean) "")
       ('code (funcall silently) (funcall clean) (org-babel-exp-code info type))
-- 
1.9.3 (Apple Git-50)

From c89448e5e6859a6c5c9d5d954470d17b3fdb8b25 Mon Sep 17 00:00:00 2001
From: chasberry <ccbe...@ucsd.edu>
Date: Wed, 21 Jan 2015 18:22:07 -0800
Subject: [PATCH 3/3] lisp/ob-core.el: Inline source block / babel call results
 are replaceable

* lisp/ob-core.el (org-babel-insert-result): Delete any `results'
  macro following current inline src block or babel call; insert
  current value in 'results' macro possibly wrapping RESULT in an
  export snippet or inline source block first.

* lisp/ob-core.el (org-babel-remove-inline-result): Delete results of
  current inline src block or inline babel call if it is wrapped in a
  "{{{results(.*)}}}" macro call.

* lisp/ob-core.el (org-babel-get-lob-one-liner-matches): Ensure that
  the point ends up on the same line as, and just before, `call_'
  before setting match-data.
---
 lisp/ob-core.el | 152 ++++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 115 insertions(+), 37 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 892c3e3..457a4fd 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -252,8 +252,11 @@ Returns non-nil if match-data set"
   "Set match data if on line of an lob one liner.
 Returns non-nil if match-data set"
   (save-excursion
-    (unless (= (point) (point-at-bol)) ;; move before inline block
-      (re-search-backward "[ \f\t\n\r\v]" nil t))
+    (let* ((el (org-element-context))
+          (beg (org-element-property :begin el))
+          (type (org-element-type el)))
+      (when (eq type 'inline-babel-call)
+       (goto-char beg)))
     (if (looking-at org-babel-inline-lob-one-liner-regexp)
        t
       nil)))
@@ -2063,21 +2066,27 @@ If the path of the link is a file path it is expanded 
using
 (defun org-babel-insert-result
   (result &optional result-params info hash indent lang)
   "Insert RESULT into the current buffer.
-By default RESULT is inserted after the end of the
-current source block.  With optional argument RESULT-PARAMS
-controls insertion of results in the org-mode file.
-RESULT-PARAMS can take the following values:
+
+By default RESULT is inserted after the end of the current source
+block.  The RESULT of an inline source block usually will be
+wrapped inside a `results' macro and placed on the same line as
+the inline source block.  The macro is stripped upon export.
+Multiline and non-scalar RESULTS from inline source blocks are
+not allowed.  With optional argument RESULT-PARAMS controls
+insertion of results in the Org mode file.  RESULT-PARAMS can
+take the following values:
 
 replace - (default option) insert results after the source block
-          replacing any previously inserted results
+          or inline source block replacing any previously
+          inserted results.
 
 silent -- no results are inserted into the Org-mode buffer but
           the results are echoed to the minibuffer and are
           ingested by Emacs (a potentially time consuming
-          process)
+          process).
 
 file ---- the results are interpreted as a file path, and are
-          inserted into the buffer using the Org-mode file syntax
+          inserted into the buffer using the Org-mode file syntax.
 
 list ---- the results are interpreted as an Org-mode list.
 
@@ -2086,8 +2095,9 @@ raw ----- results are added directly to the Org-mode 
file.  This
           formatted text.
 
 drawer -- results are added directly to the Org-mode file as with
-          \"raw\", but are wrapped in a RESULTS drawer, allowing
-          them to later be replaced or removed automatically.
+          \"raw\", but are wrapped in a RESULTS drawer or results
+          macro, allowing them to later be replaced or removed
+          automatically.
 
 org ----- results are added inside of a \"src_org{}\" or \"#+BEGIN_SRC
           org\" block depending on whether the current source block is
@@ -2095,20 +2105,39 @@ org ----- results are added inside of a \"src_org{}\" 
or \"#+BEGIN_SRC
           but Org syntax here will be discarded when exporting the
           file.
 
-html ---- results are added inside of a #+BEGIN_HTML block.  This
-          is a good option if you code block will output html
-          formatted text.
+html ---- results are added inside of a #+BEGIN_HTML block or
+          html export snippet depending on whether the current
+          source block is inline or not.  This is a good option
+          if your code block will output html formatted text.
 
-latex --- results are added inside of a #+BEGIN_LATEX block.
-          This is a good option if you code block will output
-          latex formatted text.
+latex --- results are added inside of a #+BEGIN_LATEX block or
+          latex export snippet depending on whether the current
+          source block is inline or not.  This is a good option
+          if your code block will output latex formatted text.
 
 code ---- the results are extracted in the syntax of the source
           code of the language being evaluated and are added
           inside of a source block with the source-code language
           set appropriately.  Also, source block inlining is
           preserved in this case.  Note this relies on the
-          optional LANG argument."
+          optional LANG argument.
+
+list ---- the results are rendered as a list.  This option not
+          allowed for inline src blocks.
+
+table --- the results are rendered as a table.  This option not
+          allowed for inline src blocks.
+
+INFO may provide the values of these header arguments (in the
+`header-arguments-alist' see the docstring for
+`org-babel-get-src-block-info'):
+
+:file --- the name of the file to which output should be written. 
+
+:wrap --- the effect is similar to `latex' in RESULT-PARAMS but
+          using the argument supplied to specify the export block
+          or snippet type."
+  
   (if (stringp result)
       (progn
         (setq result (org-no-properties result))
@@ -2128,11 +2157,19 @@ code ---- the results are extracted in the syntax of 
the source
                (when (or (org-babel-get-inline-src-block-matches)
                          (org-babel-get-lob-one-liner-matches))
                  (goto-char (match-end 0))
-                 (insert (if (listp result) "\n" " "))
+                 (insert " ")
                  (point))))
-            (existing-result (unless inlinep
+            (existing-result (if inlinep
+                                 (org-babel-remove-inline-result)
                                (org-babel-where-is-src-block-result
                                 t info hash indent)))
+            (bad-inline-p
+             (when inlinep
+               (or
+                (and (member "table" result-params) "`:results table'")
+                (and (listp result) "list result")
+                (and (string-match-p "\n." result) "multiline result")
+                (and (member "list" result-params) "`:results list'"))))
             (results-switches
              (cdr (assoc :results_switches (nth 2 info))))
             (visible-beg (copy-marker (point-min)))
@@ -2169,7 +2206,12 @@ code ---- the results are extracted in the syntax of the 
source
                 ((member "prepend" result-params)))) ; already there
              (setq results-switches
                    (if results-switches (concat " " results-switches) ""))
-             (let ((wrap (lambda (start finish &optional no-escape no-newlines)
+             (let ((wrap (lambda (start finish &optional no-escape no-newlines
+                                        inline-start inline-finish)
+                           (when inlinep
+                             (setq start inline-start)
+                             (setq finish inline-finish)
+                             (setq no-newlines t))
                            (goto-char end)
                            (insert (concat finish (unless no-newlines "\n")))
                            (goto-char beg)
@@ -2184,6 +2226,9 @@ code ---- the results are extracted in the syntax of the 
source
                (cond
                 ;; do nothing for an empty result
                 ((null result))
+                ;; illegal inline result or params
+                (bad-inline-p
+                 (error "Inline error: %s cannot be used" bad-inline-p))
                 ;; insert a list if preferred
                 ((member "list" result-params)
                  (insert
@@ -2208,44 +2253,59 @@ code ---- the results are extracted in the syntax of 
the source
                 ((and (listp result) (not (funcall proper-list-p result)))
                  (insert (format "%s\n" result)))
                 ((member "file" result-params)
-                 (when inlinep (goto-char inlinep))
+                 (when inlinep
+                   (goto-char inlinep)
+                   (setq result) (org-macro-escape-arguments result))
                  (insert result))
+                ((and inlinep
+                      (not (member "raw" result-params)))
+                 (goto-char inlinep)
+                 (insert (org-macro-escape-arguments
+                          (org-babel-chomp result "\n"))))
                 (t (goto-char beg) (insert result)))
                (when (funcall proper-list-p result) (goto-char 
(org-table-end)))
                (setq end (point-marker))
                ;; possibly wrap result
                (cond
+                (bad-inline-p) ;; do nothing
                 ((assoc :wrap (nth 2 info))
                  (let ((name (or (cdr (assoc :wrap (nth 2 info))) "RESULTS")))
                    (funcall wrap (concat "#+BEGIN_" name)
-                            (concat "#+END_" (car (org-split-string name))))))
+                            (concat "#+END_" (car (org-split-string name)))
+                            nil nil (concat "{{{results(@@" name ":") 
"@@)}}}")))
                 ((member "html" result-params)
-                 (funcall wrap "#+BEGIN_HTML" "#+END_HTML"))
-                ((member "latex" result-params)
-                 (funcall wrap "#+BEGIN_LaTeX" "#+END_LaTeX"))
+                 (funcall wrap "#+BEGIN_HTML" "#+END_HTML" nil nil
+                          "{{{results(@@html:" "@@)}}}"))
+                ((member "latex" result-params) 
+                 (funcall wrap "#+BEGIN_LaTeX" "#+END_LaTeX" nil nil
+                          "{{{results(@@latex:" "@@)}}}"))
                 ((member "org" result-params)
                  (goto-char beg) (if (org-at-table-p) (org-cycle))
-                 (if inlinep
-                     (funcall wrap "src_org{" "}" nil t)
-                     (funcall wrap "#+BEGIN_SRC org" "#+END_SRC")))
+                 (funcall wrap "#+BEGIN_SRC org" "#+END_SRC" nil nil
+                          "{{{results(src_org{" "})}}}"))
                 ((member "code" result-params)
                  (let ((lang (or lang "none")))
-                   (if inlinep
-                       (funcall wrap (format "src_%s[%s]{" lang 
results-switches)
-                                "}" nil t)
-                       (funcall wrap (format "#+BEGIN_SRC %s%s" lang 
results-switches)
-                                "#+END_SRC"))))
+                   (funcall wrap (format "#+BEGIN_SRC %s%s" lang 
results-switches)
+                            "#+END_SRC" nil nil
+                            (format "{{{results(src_%s[%s]{" lang 
results-switches)
+                            "})}}}")))
                 ((member "raw" result-params)
                  (goto-char beg) (if (org-at-table-p) (org-cycle)))
                 ((or (member "drawer" result-params)
                      ;; Stay backward compatible with <7.9.2
                      (member "wrap" result-params))
                  (goto-char beg) (if (org-at-table-p) (org-cycle))
-                 (funcall wrap ":RESULTS:" ":END:" 'no-escape))
+                 (funcall wrap ":RESULTS:" ":END:" 'no-escape nil
+                          "{{{results(" ")}}}"))
+                ((and inlinep (member "file" result-params))
+                 (funcall wrap nil nil nil nil "{{{results(" ")}}}"))
                 ((and (not (funcall proper-list-p result))
                       (not (member "file" result-params)))
-                 (org-babel-examplify-region beg end results-switches)
-                 (setq end (point)))))
+                 (let ((org-babel-inline-result-wrap
+                        ;; Hard code {{{results(...)}}} on top of 
customization.
+                        (format "{{{results(%s)}}}" 
org-babel-inline-result-wrap)))
+                   (org-babel-examplify-region beg end results-switches)
+                   (setq end (point))))))
              ;; possibly indent the results to match the #+results line
              (when (and (not inlinep) (numberp indent) indent (> indent 0)
                         ;; in this case `table-align' does the work for us
@@ -2273,6 +2333,24 @@ code ---- the results are extracted in the syntax of the 
source
           (if keep-keyword (1+ (match-end 0)) (1- (match-beginning 0)))
           (progn (forward-line 1) (org-babel-result-end))))))))
 
+(defun org-babel-remove-inline-result ()
+  "Remove the result of the current inline-src-block or babel call.
+The result must be wrapped in a `results' macro to be
+  removed. Extraneous leading whitespace is trimmed."
+  (let* ((el (org-element-context))
+        (post-blank (org-element-property :post-blank el)))
+    (when (memq (org-element-type el) '(inline-src-block inline-babel-call))
+      (org-with-wide-buffer
+        (goto-char (org-element-property :end el))
+        (let  ((el (org-element-context)))
+         (when (and (eq (org-element-type el) 'macro)
+                    (string= (org-element-property :key el) "results"))
+           (delete-region ; And (only) extra leading whitespace.
+            (- (org-element-property :begin el)
+               (- post-blank 1))
+            (- (org-element-property :end el)
+               (org-element-property :post-blank el)))))))))
+
 (defun org-babel-remove-result-one-or-many (x)
   "Remove the result of the current source block.
 If called with a prefix argument, remove all result blocks
-- 
1.9.3 (Apple Git-50)

Demonstrate inline-src block-behavior and the {{{results( )}}} macro.

The `demo' src block sets up an inline-src-block, calls it, then
exports the result. The output is as follows:

- inline-src-block :: inline-src-block with headers and content.
- export backend :: Which backend was used to render the result.
- result :: What the ~*.org~ buffer looks looks like after babel
     executes the inline-src-block. If an error stops execution, the
     phrase 'Stopped for Error' is shown after the inline src block.
- exported as :: Show the exported version (starting on the next
     line). If an error stops execution, the phrase 'Stopped for
     Error' is shown.

* :results replace (default) 


#+name: demo
#+BEGIN_SRC emacs-lisp :var str="replace" bkend="ascii" contents="42"
  (let ((cmd (format "src_emacs-lisp[:results %s]{%s}" str contents)))
    (concat "inline-src-block: " cmd "\nexport backend: " bkend 
            "\nresult: " (with-temp-buffer
                           (insert cmd)
                           (or (ignore-errors
                                 (org-babel-execute-buffer))
                               (progn
                                 (goto-char (point-max))
                                 (insert "Stopped for Error")))
                           (buffer-string))
            "\nexported as:\n"
            (or
             (ignore-errors
               (org-export-string-as cmd (intern bkend) t))
             "Stopped for Error")))
#+END_SRC

#+RESULTS: demo
: inline-src-block: src_emacs-lisp[:results replace]{42}
: export backend: ascii
: result: src_emacs-lisp[:results replace]{42} {{{results(=42=)}}}
: exported as:
: `42'


#+CALL: demo("replace")

#+RESULTS:
: inline-src-block: src_emacs-lisp[:results replace]{42}
: export backend: ascii
: result: src_emacs-lisp[:results replace]{42} {{{results(=42=)}}}
: exported as:
: `42'

* :results html under html backend

#+CALL: demo("html","html")

#+RESULTS:
: inline-src-block: src_emacs-lisp[:results html]{42}
: export backend: html
: result: src_emacs-lisp[:results html]{42} {{{results(@@html:42@@)}}}
: exported as:
: <p>
: 42</p>

* :results html under latex backend

#+CALL: demo("html","latex")

#+RESULTS:
: inline-src-block: src_emacs-lisp[:results html]{42}
: export backend: latex
: result: src_emacs-lisp[:results html]{42} {{{results(@@html:42@@)}}}
: exported as:

* :results latex under latex backend

#+CALL: demo("latex","latex")

#+RESULTS:
: inline-src-block: src_emacs-lisp[:results latex]{42}
: export backend: latex
: result: src_emacs-lisp[:results latex]{42} {{{results(@@latex:42@@)}}}
: exported as:
: 42

* :results replace :wrap ascii

#+CALL: demo("replace :wrap ascii","ascii")

#+RESULTS:
: inline-src-block: src_emacs-lisp[:results replace :wrap ascii]{42}
: export backend: ascii
: result: src_emacs-lisp[:results replace :wrap ascii]{42} 
{{{results(@@ascii:42@@)}}}
: exported as:
: 42

* :results raw

#+CALL: demo("raw")

#+RESULTS:
: inline-src-block: src_emacs-lisp[:results raw]{42}
: export backend: ascii
: result: src_emacs-lisp[:results raw]{42} 42
: exported as:
: 42

* :results drawer

Same as default.

#+CALL: demo("drawer")

#+RESULTS:
: inline-src-block: src_emacs-lisp[:results drawer]{42}
: export backend: ascii
: result: src_emacs-lisp[:results drawer]{42} {{{results(42)}}}
: exported as:
: 42

* :results org

Code is quoted like this: `42' under ascii backend.

#+CALL: demo("org")

#+RESULTS:
: inline-src-block: src_emacs-lisp[:results org]{42}
: export backend: ascii
: result: src_emacs-lisp[:results org]{42} {{{results(src_org{42})}}}
: exported as:
: `42'

* :results code

Code is quoted like this: `42' under ascii backend.

#+CALL: demo("code")

#+RESULTS:
: inline-src-block: src_emacs-lisp[:results code]{42}
: export backend: ascii
: result: src_emacs-lisp[:results code]{42} {{{results(src_emacs-lisp[]{42})}}}
: exported as:
: `42'

* :results list

Lists and tables should be avoided for inline-src-blocks, but for
completeness some are listed here.

#+CALL: demo("list")

#+RESULTS:
: inline-src-block: src_emacs-lisp[:results list]{42}
: export backend: ascii
: result: src_emacs-lisp[:results list]{42} Stopped for Error
: exported as:
: Stopped for Error

* :results table

#+CALL: demo("table")

#+RESULTS:
: inline-src-block: src_emacs-lisp[:results table]{42}
: export backend: ascii
: result: src_emacs-lisp[:results table]{42} Stopped for Error
: exported as:
: Stopped for Error

* :results replace, proper list as content

Proper lists become tables.

#+CALL: demo(contents="\'(42)")

#+RESULTS:
: inline-src-block: src_emacs-lisp[:results replace]{'(42) }
: export backend: ascii
: result: src_emacs-lisp[:results replace]{'(42) } Stopped for Error
: exported as:
: Stopped for Error

* :results code, contents as elisp

#+CALL: demo("code",contents="(quote (+ 1 2))")

#+RESULTS:
: inline-src-block: src_emacs-lisp[:results code]{(quote (+ 1 2) )}
: export backend: ascii
: result: src_emacs-lisp[:results code]{(quote (+ 1 2) )} 
{{{results(src_emacs-lisp[]{(+ 1 2)})}}}
: exported as:
: `(+ 1 2)'



* inline calls

The `demo' src block sets up an inline-babel-call, calls it, then
exports the result. The output is as described above.



#+name: square-code
#+begin_src org :export code :eval no
  ,#+name: square
  ,#+BEGIN_SRC emacs-lisp :var x=1 :exports none
  (* x x)
  ,#+end_src
#+end_src

#+name: demo_calls
#+BEGIN_SRC emacs-lisp :var str="replace" bkend="ascii" contents=3 :noweb yes
    (let ((cmd (format "call_square(%s)[:results %s] " contents str)))
      (concat "inline-babel-call: " cmd "\nexport backend: " bkend 
              "\nresult: " (with-temp-buffer
                             (insert cmd "
  <<square-code>>"
                                     )
                             (or (ignore-errors
                                   (org-babel-execute-buffer))
                                 (progn
                                   (goto-char (point-min))
                                   (goto-char (point-at-eol))
                                   (insert "Stopped for Error")))
                             (let (( bstr (buffer-string)))
                               (replace-regexp-in-string "\n[#]\\(.\\|\n\\)*" 
"" 
                               bstr)))
              "\nexported as:\n"
              (or
               (ignore-errors
                 (org-export-string-as
                  (concat "
  <<square-code>>"
                          "\n" cmd)
                  (intern bkend) t))
               "Stopped for Error")))

#+END_SRC

#+RESULTS: demo_calls
: inline-babel-call: call_square(3)[:results replace] 
: export backend: ascii
: result: call_square(3)[:results replace] {{{results(=9=)}}} 
: exported as:
: `9'


#+CALL: demo_calls("replace")

#+RESULTS:
: inline-babel-call: call_square(3)[:results replace] 
: export backend: ascii
: result: call_square(3)[:results replace] {{{results(=9=)}}} 
: exported as:
: `9'

#+CALL: demo_calls("html","html")

#+RESULTS:
: inline-babel-call: call_square(3)[:results html] 
: export backend: html
: result: call_square(3)[:results html] {{{results(@@html:9@@)}}} 
: exported as:
: <p>
: 9 </p>

#+CALL: demo_calls("html","latex")

#+RESULTS:
: inline-babel-call: call_square(3)[:results html] 
: export backend: latex
: result: call_square(3)[:results html] {{{results(@@html:9@@)}}} 
: exported as:
:  

#+CALL: demo_calls("latex","latex")

#+RESULTS:
: inline-babel-call: call_square(3)[:results latex] 
: export backend: latex
: result: call_square(3)[:results latex] {{{results(@@latex:9@@)}}} 
: exported as:
: 9 

#+CALL: demo_calls("raw")

#+RESULTS:
: inline-babel-call: call_square(3)[:results raw] 
: export backend: ascii
: result: call_square(3)[:results raw] 9 
: exported as:
: 9

#+CALL: demo_calls("drawer")

#+RESULTS:
: inline-babel-call: call_square(3)[:results drawer] 
: export backend: ascii
: result: call_square(3)[:results drawer] {{{results(9)}}} 
: exported as:
: 9

#+CALL: demo_calls("org")

#+RESULTS:
: inline-babel-call: call_square(3)[:results org] 
: export backend: ascii
: result: call_square(3)[:results org] {{{results(src_org{9})}}} 
: exported as:
: `9'

#+CALL: demo_calls("list")

#+RESULTS:
: inline-babel-call: call_square(3)[:results list] 
: export backend: ascii
: result: call_square(3)[:results list]  Stopped for Error
: exported as:
: Stopped for Error

#+CALL: demo_calls("code")

#+RESULTS:
: inline-babel-call: call_square(3)[:results code] 
: export backend: ascii
: result: call_square(3)[:results code] {{{results(src_emacs-lisp[]{9})}}} 
: exported as:
: `9'

#+CALL: demo_calls("table")

#+RESULTS:
: inline-babel-call: call_square(3)[:results table] 
: export backend: ascii
: result: call_square(3)[:results table]  Stopped for Error
: exported as:
: Stopped for Error

#+CALL: demo_calls("code",contents="(quote (+ 1 2))")

#+RESULTS:
: inline-babel-call: call_square((quote (+ 1 2) ))[:results code] 
: export backend: ascii
: result: call_square((quote (+ 1 2) ))[:results code] Stopped for Error
: exported as:
: Stopped for Error

#+CALL: demo_calls("replace :wrap ascii","ascii")

#+RESULTS:
: inline-babel-call: call_square(3)[:results replace :wrap ascii] 
: export backend: ascii
: result: call_square(3)[:results replace :wrap ascii] 
{{{results(@@ascii:9@@)}}} 
: exported as:
: 9

Reply via email to