From 757312dde3b626cde59b69ea631daf9102531110 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 21 Sep 2010 00:39:55 +0100 Subject: [PATCH] babel: Remove unused temporary file variable * ob-sh.el (org-babel-sh-evaluate): Remove unused temporary file variable --- lisp/ob-sh.el | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/lisp/ob-sh.el b/lisp/ob-sh.el index cf8f82928..29a0a195c 100644 --- a/lisp/ob-sh.el +++ b/lisp/ob-sh.el @@ -160,21 +160,20 @@ return the value of the last statement in BODY." (org-babel-import-elisp-from-file tmp-file)))) (if (not session) (org-babel-eval org-babel-sh-command (org-babel-trim body)) - (let ((tmp-file (org-babel-temp-file "sh-"))) - (mapconcat - #'org-babel-sh-strip-weird-long-prompt - (mapcar - #'org-babel-trim - (butlast - (org-babel-comint-with-output - (session org-babel-sh-eoe-output t body) - (mapc - (lambda (line) - (insert line) (comint-send-input nil t) (sleep-for 0.25)) - (append - (split-string (org-babel-trim body) "\n") - (list org-babel-sh-eoe-indicator)))) - 2)) "\n"))))) + (mapconcat + #'org-babel-sh-strip-weird-long-prompt + (mapcar + #'org-babel-trim + (butlast + (org-babel-comint-with-output + (session org-babel-sh-eoe-output t body) + (mapc + (lambda (line) + (insert line) (comint-send-input nil t) (sleep-for 0.25)) + (append + (split-string (org-babel-trim body) "\n") + (list org-babel-sh-eoe-indicator)))) + 2)) "\n")))) (defun org-babel-sh-strip-weird-long-prompt (string) "Remove prompt cruft from a string of shell output."