summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-11-26 15:48:14 -0700
committerEric Schulte <schulte.eric@gmail.com>2010-11-26 15:48:22 -0700
commit01b4f63fe9518f12ffdb233787d3e50bc8e4fe1a (patch)
treed4e1507cf6d9911be66fd15c9acd530319f7494d
parent172a3b6532a941b2afc86650df559c13c916b298 (diff)
downloadorg-mode-01b4f63fe9518f12ffdb233787d3e50bc8e4fe1a.tar.gz
ob: no longer escaping results which will be wrapped in a block.
* lisp/ob.el (org-babel-insert-result): No longer escape results which will be wrapped in a block.
-rw-r--r--lisp/ob.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/ob.el b/lisp/ob.el
index 5a9dbd3..2feb1ae 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -1467,9 +1467,7 @@ code ---- the results are extracted in the syntax of the source
(goto-char beg) (when (org-at-table-p) (org-table-align)))
((member "file" result-params)
(insert result))
- (t (goto-char beg)
- (org-babel-examplize-region
- (point) (progn (insert result) (point)) results-switches)))
+ (t (goto-char beg) (insert result)))
(setq end (if (listp result) (org-table-end) (point)))
;; possibly wrap result
(flet ((wrap (start finish)
@@ -1490,7 +1488,11 @@ code ---- the results are extracted in the syntax of the source
((member "raw" result-params)
(goto-char beg) (if (org-at-table-p) (org-cycle)))
((member "wrap" result-params)
- (wrap "#+BEGIN_RESULT\n" "#+END_RESULT"))))
+ (when (and (stringp result) (not (member "file" result-params)))
+ (org-babel-examplize-region beg end results-switches))
+ (wrap "#+BEGIN_RESULT\n" "#+END_RESULT"))
+ ((and (stringp result) (not (member "file" result-params)))
+ (org-babel-examplize-region beg end results-switches))))
;; possibly indent the results to match the #+results line
(when (and indent (> indent 0)
;; in this case `table-align' does the work for us