summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Schmitt <alan.schmitt@polytechnique.org>2013-05-07 14:15:33 +0200
committerAlan Schmitt <alan.schmitt@polytechnique.org>2013-05-07 14:15:33 +0200
commit706a546fcf7c860a23edc5ce22556806ed2aed12 (patch)
tree85a43e66949786b9902fb88d9c9a8d94ff827c86
parent39becc638142ccc9d579ce985462309896206321 (diff)
downloadorg-mode-706a546fcf7c860a23edc5ce22556806ed2aed12.tar.gz
Babel ocaml: fix bug where the first exported result would end up in the ocaml
buffer * lisp/ob-ocaml.el (org-babel-prep-session:ocaml): use `save-window-excursion' around the code starting the tuareg process.
-rw-r--r--lisp/ob-ocaml.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/ob-ocaml.el b/lisp/ob-ocaml.el
index 1a194d8..25f79c5 100644
--- a/lisp/ob-ocaml.el
+++ b/lisp/ob-ocaml.el
@@ -103,9 +103,9 @@
(stringp session))
session
tuareg-interactive-buffer-name)))
- (if (fboundp 'tuareg-run-process-if-needed)
- (tuareg-run-process-if-needed org-babel-ocaml-command)
- (tuareg-run-caml))
+ (save-window-excursion (if (fboundp 'tuareg-run-process-if-needed)
+ (tuareg-run-process-if-needed org-babel-ocaml-command)
+ (tuareg-run-caml)))
(get-buffer tuareg-interactive-buffer-name)))
(defun org-babel-variable-assignments:ocaml (params)