forked from mirrors/org-mode
fix bug in drawer results (should not escape)
* lisp/ob.el (org-babel-insert-result): Don't escape results in drawers.
This commit is contained in:
parent
854ddf635c
commit
c2ebeea6f6
|
@ -1943,10 +1943,11 @@ code ---- the results are extracted in the syntax of the source
|
||||||
((member "prepend" result-params)))) ; already there
|
((member "prepend" result-params)))) ; already there
|
||||||
(setq results-switches
|
(setq results-switches
|
||||||
(if results-switches (concat " " results-switches) ""))
|
(if results-switches (concat " " results-switches) ""))
|
||||||
(let ((wrap (lambda (start finish)
|
(let ((wrap (lambda (start finish &optional no-escape)
|
||||||
(goto-char end) (insert (concat finish "\n"))
|
(goto-char end) (insert (concat finish "\n"))
|
||||||
(goto-char beg) (insert (concat start "\n"))
|
(goto-char beg) (insert (concat start "\n"))
|
||||||
(org-escape-code-in-region (point) end)
|
(unless no-escape
|
||||||
|
(org-escape-code-in-region (point) end))
|
||||||
(goto-char end) (goto-char (point-at-eol))
|
(goto-char end) (goto-char (point-at-eol))
|
||||||
(setq end (point-marker))))
|
(setq end (point-marker))))
|
||||||
(proper-list-p (lambda (it) (and (listp it) (null (cdr (last it)))))))
|
(proper-list-p (lambda (it) (and (listp it) (null (cdr (last it)))))))
|
||||||
|
@ -2002,7 +2003,7 @@ code ---- the results are extracted in the syntax of the source
|
||||||
((or (member "drawer" result-params)
|
((or (member "drawer" result-params)
|
||||||
;; Stay backward compatible with <7.9.2
|
;; Stay backward compatible with <7.9.2
|
||||||
(member "wrap" result-params))
|
(member "wrap" result-params))
|
||||||
(funcall wrap ":RESULTS:" ":END:"))
|
(funcall wrap ":RESULTS:" ":END:" 'no-escape))
|
||||||
((and (not (funcall proper-list-p result))
|
((and (not (funcall proper-list-p result))
|
||||||
(not (member "file" result-params)))
|
(not (member "file" result-params)))
|
||||||
(org-babel-examplize-region beg end results-switches)
|
(org-babel-examplize-region beg end results-switches)
|
||||||
|
|
Loading…
Reference in a new issue