diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2010-11-12 17:04:53 -0700 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2010-11-12 17:04:53 -0700 |
commit | c53567879264edb757e439446751a7fdbba7dbf1 (patch) | |
tree | 99d325a4616fb887edbe52beedee5d72276c0781 | |
parent | 5da47e2c2ec83a4856a1360d2add3337b89eedfb (diff) | |
download | org-mode-c53567879264edb757e439446751a7fdbba7dbf1.tar.gz |
ob-calc: ensure the *Calculator* buffer exists before it is used
* lisp/ob-calc.el (org-babel-execute:calc): Ensure the *Calculator*
buffer exists before it is used.
-rw-r--r-- | lisp/ob-calc.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/ob-calc.el b/lisp/ob-calc.el index 64feb53..79fe404 100644 --- a/lisp/ob-calc.el +++ b/lisp/ob-calc.el @@ -40,6 +40,8 @@ (defun org-babel-execute:calc (body params) "Execute a block of calc code with Babel." + (unless (get-buffer "*Calculator*") + (save-window-excursion (calc) (calc-quit))) (let* ((vars (mapcar #'cdr (org-babel-get-header params :var))) (var-syms (mapcar #'car vars)) (var-names (mapcar #'symbol-name var-syms))) |