summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-09-26 10:56:20 +0200
committerBastien Guerry <bzg@altern.org>2012-09-26 10:56:20 +0200
commitb50c465c1703be6fbf8b499bcb1df6574e9691e2 (patch)
tree673df09e8e28f094764b87a715975f6f2c6cd23f
parenta2408063f9c4ed3d41343ea0d04c15cab2cdba78 (diff)
parent440b9388d4ebcd60c0ec6f4307935dd793ae5261 (diff)
downloadorg-mode-b50c465c1703be6fbf8b499bcb1df6574e9691e2.tar.gz
Merge branch 'maint'
-rw-r--r--doc/org.texi8
-rw-r--r--lisp/ob.el8
2 files changed, 13 insertions, 3 deletions
diff --git a/doc/org.texi b/doc/org.texi
index 186a8ef..bb248a8 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -13683,10 +13683,14 @@ buffer as quoted text. E.g., @code{:results value verbatim}.
@item @code{file}
The results will be interpreted as the path to a file, and will be inserted
into the Org mode buffer as a file link. E.g., @code{:results value file}.
-@item @code{raw}, @code{org}
+@item @code{raw}
The results are interpreted as raw Org mode code and are inserted directly
into the buffer. If the results look like a table they will be aligned as
such by Org mode. E.g., @code{:results value raw}.
+@item @code{org}
+The results are will be enclosed in a @code{BEGIN_SRC org} block.
+They are not comma-escaped by default but they will be if you hit @kbd{TAB}
+in the block and/or if you export the file. E.g., @code{:results value org}.
@item @code{html}
Results are assumed to be HTML and will be enclosed in a @code{BEGIN_HTML}
block. E.g., @code{:results value html}.
@@ -13700,7 +13704,7 @@ E.g., @code{:results value code}.
The result is converted to pretty-printed code and is enclosed in a code
block. This option currently supports Emacs Lisp, Python, and Ruby. E.g.,
@code{:results value pp}.
-@item @code{wrap}
+@item @code{drawer}
The result is wrapped in a RESULTS drawer. This can be useful for
inserting @code{raw} or @code{org} syntax results in such a way that their
extent is known and they can be automatically removed or replaced.
diff --git a/lisp/ob.el b/lisp/ob.el
index 7b217ea..1316893 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -420,7 +420,7 @@ then run `org-babel-pop-to-session'."
(noweb-sep . :any)
(padline . ((yes no)))
(results . ((file list vector table scalar verbatim)
- (raw html latex code pp drawer)
+ (raw html latex org code pp drawer)
(replace silent append prepend)
(output value)))
(rownames . ((no yes)))
@@ -1870,6 +1870,10 @@ 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.
+org ----- results are added inside of a \"#+BEGIN_SRC org\" block.
+ They are not comma-escaped when inserted, 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.
@@ -1981,6 +1985,8 @@ code ---- the results are extracted in the syntax of the source
(funcall wrap "#+BEGIN_HTML" "#+END_HTML"))
((member "latex" result-params)
(funcall wrap "#+BEGIN_LaTeX" "#+END_LaTeX"))
+ ((member "org" result-params)
+ (funcall wrap "#+BEGIN_SRC org" "#+END_SRC"))
((member "code" result-params)
(funcall wrap (format "#+BEGIN_SRC %s%s" (or lang "none") results-switches)
"#+END_SRC"))