From 706a546fcf7c860a23edc5ce22556806ed2aed12 Mon Sep 17 00:00:00 2001 From: Alan Schmitt Date: Tue, 7 May 2013 14:15:33 +0200 Subject: [PATCH] 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. --- lisp/ob-ocaml.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/ob-ocaml.el b/lisp/ob-ocaml.el index 1a194d81e..25f79c5b7 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) -- 2.11.4.GIT