summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Davison <davison@stats.ox.ac.uk>2010-09-21 00:39:55 +0100
committerDan Davison <davison@stats.ox.ac.uk>2010-09-22 22:10:13 +0100
commit757312dde3b626cde59b69ea631daf9102531110 (patch)
tree67a0f291a533eb00d234ddfe99b0ec5b4bf023ec
parent9993463c4dc8fcb0afaca1f5419e359c45941c66 (diff)
downloadorg-mode-757312dde3b626cde59b69ea631daf9102531110.tar.gz
babel: Remove unused temporary file variable
* ob-sh.el (org-babel-sh-evaluate): Remove unused temporary file variable
-rw-r--r--lisp/ob-sh.el29
1 files changed, 14 insertions, 15 deletions
diff --git a/lisp/ob-sh.el b/lisp/ob-sh.el
index cf8f829..29a0a19 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."