diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2011-01-11 10:41:35 -0700 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2011-01-11 10:41:35 -0700 |
commit | 1c3ef40f2491b118965cbdbbe5bd35a00dbc8b62 (patch) | |
tree | 32aad9c897b011925af28c62758f04f1d343fe12 | |
parent | 9318030ba36866f00f7330480a0930ea992aa398 (diff) | |
download | org-mode-1c3ef40f2491b118965cbdbbe5bd35a00dbc8b62.tar.gz |
ob: fixed bug in org-babel-read-result
Thanks to Leo Alekseyev for bringing this bug to my attention
* lisp/ob.el (org-babel-open-src-block-result): Must collect result
*before* jumping to the result buffer.
-rw-r--r-- | lisp/ob.el | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -592,10 +592,11 @@ results already exist." (if (looking-at org-bracket-link-regexp) ;; file results (org-open-at-point) - (pop-to-buffer (get-buffer-create "*Org-Babel Results*")) - (delete-region (point-min) (point-max)) - (insert (org-babel-format-result (org-babel-read-result) - (cdr (assoc :sep (nth 2 info)))))) + (let ((r (org-babel-format-result + (org-babel-read-result) (cdr (assoc :sep (nth 2 info)))))) + (pop-to-buffer (get-buffer-create "*Org-Babel Results*")) + (delete-region (point-min) (point-max)) + (insert r))) t)))) ;;;###autoload |