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
This commit is contained in:
Eric Schulte 2010-10-29 10:20:07 -06:00
parent 52c87c93b2
commit 9c833c456e
1 changed files with 4 additions and 1 deletions

View File

@ -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)