Explorar o código

Merge branch 'maint'

Bastien Guerry %!s(int64=12) %!d(string=hai) anos
pai
achega
b50c465c17
Modificáronse 2 ficheiros con 13 adicións e 3 borrados
  1. 6 2
      doc/org.texi
  2. 7 1
      lisp/ob.el

+ 6 - 2
doc/org.texi

@@ -13683,10 +13683,14 @@ buffer as quoted text.  E.g., @code{:results value verbatim}.
 @item @code{file}
 @item @code{file}
 The results will be interpreted as the path to a file, and will be inserted
 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}.
 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
 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
 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}.
 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}
 @item @code{html}
 Results are assumed to be HTML and will be enclosed in a @code{BEGIN_HTML}
 Results are assumed to be HTML and will be enclosed in a @code{BEGIN_HTML}
 block.  E.g., @code{:results value 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
 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.,
 block.  This option currently supports Emacs Lisp, Python, and Ruby.  E.g.,
 @code{:results value pp}.
 @code{:results value pp}.
-@item @code{wrap}
+@item @code{drawer}
 The result is wrapped in a RESULTS drawer.  This can be useful for
 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
 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.
 extent is known and they can be automatically removed or replaced.

+ 7 - 1
lisp/ob.el

@@ -420,7 +420,7 @@ then run `org-babel-pop-to-session'."
     (noweb-sep  . :any)
     (noweb-sep  . :any)
     (padline	. ((yes no)))
     (padline	. ((yes no)))
     (results	. ((file list vector table scalar verbatim)
     (results	. ((file list vector table scalar verbatim)
-		   (raw html latex code pp drawer)
+		   (raw html latex org code pp drawer)
 		   (replace silent append prepend)
 		   (replace silent append prepend)
 		   (output value)))
 		   (output value)))
     (rownames	. ((no yes)))
     (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
           \"raw\", but are wrapped in a RESULTS drawer, allowing
           them to later be replaced or removed automatically.
           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
 html ---- results are added inside of a #+BEGIN_HTML block.  This
           is a good option if you code block will output html
           is a good option if you code block will output html
           formatted text.
           formatted text.
@@ -1981,6 +1985,8 @@ code ---- the results are extracted in the syntax of the source
 	    (funcall wrap "#+BEGIN_HTML" "#+END_HTML"))
 	    (funcall wrap "#+BEGIN_HTML" "#+END_HTML"))
 	   ((member "latex" result-params)
 	   ((member "latex" result-params)
 	    (funcall wrap "#+BEGIN_LaTeX" "#+END_LaTeX"))
 	    (funcall wrap "#+BEGIN_LaTeX" "#+END_LaTeX"))
+	   ((member "org" result-params)
+	    (funcall wrap "#+BEGIN_SRC org" "#+END_SRC"))
 	   ((member "code" result-params)
 	   ((member "code" result-params)
 	    (funcall wrap (format "#+BEGIN_SRC %s%s" (or lang "none") results-switches)
 	    (funcall wrap (format "#+BEGIN_SRC %s%s" (or lang "none") results-switches)
 		     "#+END_SRC"))
 		     "#+END_SRC"))