diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2013-06-21 10:06:19 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2013-06-21 10:06:19 -0600 |
commit | e1f0232f3304629a14586171cef481d5b0aaebc5 (patch) | |
tree | a24810e6e5553bcc4cd784542cbc60269892ba3a | |
parent | c5cc342e1ce7cc9d8c0c3fe3330da2e007a89b8d (diff) | |
download | org-mode-e1f0232f3304629a14586171cef481d5b0aaebc5.tar.gz |
gnuplot, close output terminal when opened
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Gnuplot, close
output terminal when opened.
-rw-r--r-- | lisp/ob-gnuplot.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el index 803309e..55d6d17 100644 --- a/lisp/ob-gnuplot.el +++ b/lisp/ob-gnuplot.el @@ -147,8 +147,11 @@ code." (funcall add-to-body (concat "set timefmt \"" (or timefmt "%Y-%m-%d-%H:%M:%S") "\""))) - (when out-file (funcall add-to-body (format "set output \"%s\"" - out-file))) + (when out-file + ;; set the terminal at the top of the block + (funcall add-to-body (format "set output \"%s\"" out-file)) + ;; and close the terminal at the bottom of the block + (setq body (concat body "\nset output\n"))) (when term (funcall add-to-body (format "set term %s" term))) ;; insert variables into code body: this should happen last ;; placing the variables at the *top* of the code in case their |