summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-09-27 23:49:08 +0200
committerBastien Guerry <bzg@altern.org>2012-09-27 23:49:08 +0200
commitb0c5030c8566e10af41543e8b52c0bdc1b01ea88 (patch)
tree45cd973d686868fbc3070c5f9c5e0c9314e6e562
parent468a73ea11d0d7cb532b2fb06a97f8ede9d2df0c (diff)
downloadorg-mode-b0c5030c8566e10af41543e8b52c0bdc1b01ea88.tar.gz
ob.el (org-babel-insert-result): Comma-escape results inserted with ":results org"
* ob.el (org-babel-insert-result): Comma-escape results inserted with ":results org".
-rw-r--r--lisp/ob.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/ob.el b/lisp/ob.el
index c77c16d..b05c572 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -1936,9 +1936,10 @@ 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)
+ (let ((wrap (lambda (start finish &optional escape)
(goto-char end) (insert (concat finish "\n"))
(goto-char beg) (insert (concat start "\n"))
+ (if escape (org-babel-do-key-sequence-in-edit-buffer (kbd "TAB")))
(goto-char end) (goto-char (point-at-eol))
(setq end (point-marker))))
(proper-list-p (lambda (it) (and (listp it) (null (cdr (last it)))))))
@@ -1985,7 +1986,7 @@ code ---- the results are extracted in the syntax of the source
((member "latex" result-params)
(funcall wrap "#+BEGIN_LaTeX" "#+END_LaTeX"))
((member "org" result-params)
- (funcall wrap "#+BEGIN_SRC org" "#+END_SRC"))
+ (funcall wrap "#+BEGIN_SRC org" "#+END_SRC" t))
((member "code" result-params)
(funcall wrap (format "#+BEGIN_SRC %s%s" (or lang "none") results-switches)
"#+END_SRC"))