diff options
author | Bastien Guerry <bzg@altern.org> | 2012-09-26 10:56:16 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-09-26 10:56:16 +0200 |
commit | 440b9388d4ebcd60c0ec6f4307935dd793ae5261 (patch) | |
tree | 6fb53955cc0aade40634cf9c5a70cc0e9e1c13d4 | |
parent | 4ebfe4f030416dd5ab36b959b242f1383cd1cc3b (diff) | |
download | org-mode-440b9388d4ebcd60c0ec6f4307935dd793ae5261.tar.gz |
ob.el: Reintroduce ":results org" but using "#+BEGIN_SRC org", not "#+BEGIN_ORG"
* ob.el (org-babel-common-header-args-w-values)
(org-babel-insert-result): Reintroduce ":results org" but
using "#+BEGIN_SRC org", not "#+BEGIN_ORG".
* org.texi (results): Update documentation for ":results
drawer" and ":results org".
-rw-r--r-- | doc/org.texi | 8 | ||||
-rw-r--r-- | lisp/ob.el | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/doc/org.texi b/doc/org.texi index b855f5a..082fe13 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -13660,10 +13660,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}. @@ -13677,7 +13681,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. @@ -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. @@ -1980,6 +1984,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")) |