瀏覽代碼

cycle tables for :results org and :results wrap

* lisp/ob-core.el (org-babel-insert-result): Cycle tables for :results
  org and :results wrap.
Eric Schulte 12 年之前
父節點
當前提交
221da3ad27
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lisp/ob-core.el

+ 2 - 0
lisp/ob-core.el

@@ -2068,6 +2068,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)
+		  (goto-char beg) (if (org-at-table-p) (org-cycle))
 		  (funcall wrap "#+BEGIN_SRC org" "#+END_SRC"))
 		 ((member "code" result-params)
 		  (funcall wrap (format "#+BEGIN_SRC %s%s" (or lang "none") results-switches)
@@ -2077,6 +2078,7 @@ code ---- the results are extracted in the syntax of the source
 		 ((or (member "drawer" result-params)
 		      ;; Stay backward compatible with <7.9.2
 		      (member "wrap" result-params))
+		  (goto-char beg) (if (org-at-table-p) (org-cycle))
 		  (funcall wrap ":RESULTS:" ":END:" 'no-escape))
 		 ((and (not (funcall proper-list-p result))
 		       (not (member "file" result-params)))