summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-10-29 10:20:07 -0600
committerEric Schulte <schulte.eric@gmail.com>2010-10-29 10:20:07 -0600
commit9c833c456e9e47c3c2829c7a07c6f440fc0ee3a0 (patch)
treeec9df4ad17e10af3085e4a3fd08dc117c6851d88
parent52c87c93b2a1a2752d95e7d3fbd16fefce2ef4a9 (diff)
downloadorg-mode-9c833c456e9e47c3c2829c7a07c6f440fc0ee3a0.tar.gz
ob-calc: ensure that calc stack refers to the correct stack
* lisp/ob-calc.el (org-babel-execute:calc): ensure that calc stack refers to the correct stack
-rw-r--r--lisp/ob-calc.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/ob-calc.el b/lisp/ob-calc.el
index 0f68de6..e5ef5a9 100644
--- a/lisp/ob-calc.el
+++ b/lisp/ob-calc.el
@@ -29,6 +29,7 @@
;;; Code:
(require 'ob)
(require 'calc)
+(require 'calc-trail)
(eval-when-compile (require 'ob-comint))
(defvar org-babel-default-header-args:calc nil
@@ -48,7 +49,9 @@
(if (numberp res) res (math-read-number res)))
(calc-eval line)))))))
(split-string (org-babel-expand-body:calc body params) "[\n\r]"))
- (calc-eval (calc-top 1)))
+ (save-excursion
+ (set-buffer (get-buffer "*Calculator*"))
+ (calc-eval (calc-top 1))))
(provide 'ob-calc)