|
|
@@ -460,14 +460,16 @@ silent -- no results are inserted"
|
|
|
(org-cycle))))
|
|
|
(message "finished"))))
|
|
|
|
|
|
-(defun org-babel-open-src-block-result ()
|
|
|
+(defun org-babel-open-src-block-result (&optional re-run)
|
|
|
(interactive)
|
|
|
"If `point' is on a src block then open the results of the
|
|
|
-source code block, otherwise return nil."
|
|
|
+source code block, otherwise return nil. With optional prefix
|
|
|
+argument RE-RUN the source-code block is evaluated even if
|
|
|
+results already exist."
|
|
|
(when (org-babel-get-src-block-info)
|
|
|
(save-excursion
|
|
|
;; go to the results, if there aren't any then run the block
|
|
|
- (goto-char (or (org-babel-where-is-src-block-result)
|
|
|
+ (goto-char (or (and (not re-run) (org-babel-where-is-src-block-result))
|
|
|
(progn (org-babel-execute-src-block)
|
|
|
(org-babel-where-is-src-block-result))))
|
|
|
(move-end-of-line 1) (forward-char 1)
|
|
|
@@ -479,7 +481,7 @@ source code block, otherwise return nil."
|
|
|
(pop-to-buffer (get-buffer-create "org-babel-results"))
|
|
|
(delete-region (point-min) (point-max))
|
|
|
(if (listp results)
|
|
|
- (insert (orgtbl-to-tsv results))
|
|
|
+ (insert (orgtbl-to-tsv (list results) nil))
|
|
|
(insert results)))))))
|
|
|
|
|
|
(defun org-babel-result-to-org-string (result)
|