summaryrefslogtreecommitdiff
path: root/lisp/ob-sh.el
diff options
context:
space:
mode:
authorSebastien Delafond <seb@debian.org>2013-08-11 16:27:56 +0200
committerS├ębastien Delafond <sdelafond@gmail.com>2014-07-13 13:35:27 +0200
commit53b246b7d66bfa03ab9bcf47d4647913b401e3d6 (patch)
treeb5ea4e732c2219456d13048feb05b37b22a76391 /lisp/ob-sh.el
parent8606e2621fc00fd8b334a06924aeef3aab7a2e4d (diff)
parente32a45ed36d6000db4b39171149072d11b77af72 (diff)
Imported Debian patch 8.0.7-1
Diffstat (limited to 'lisp/ob-sh.el')
-rw-r--r--lisp/ob-sh.el13
1 files changed, 4 insertions, 9 deletions
diff --git a/lisp/ob-sh.el b/lisp/ob-sh.el
index 1cb607f..7eda1b5 100644
--- a/lisp/ob-sh.el
+++ b/lisp/ob-sh.el
@@ -1,6 +1,6 @@
;;; ob-sh.el --- org-babel functions for shell evaluation
-;; Copyright (C) 2009-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2013 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
@@ -27,9 +27,6 @@
;;; Code:
(require 'ob)
-(require 'ob-ref)
-(require 'ob-comint)
-(require 'ob-eval)
(require 'shell)
(eval-when-compile (require 'cl))
@@ -109,7 +106,7 @@ var of the same value."
"Convert an elisp value to a string."
(let ((echo-var (lambda (v) (if (stringp v) v (format "%S" v)))))
(cond
- ((and (listp var) (listp (car var)))
+ ((and (listp var) (or (listp (car var)) 'hline))
(orgtbl-to-generic var (list :sep (or sep "\t") :fmt echo-var)))
((listp var)
(mapconcat echo-var var "\n"))
@@ -141,10 +138,8 @@ return the value of the last statement in BODY."
((lambda (results)
(when results
(let ((result-params (cdr (assoc :result-params params))))
- (if (or (member "scalar" result-params)
- (member "verbatim" result-params)
- (member "output" result-params))
- results
+ (org-babel-result-cond result-params
+ results
(let ((tmp-file (org-babel-temp-file "sh-")))
(with-temp-file tmp-file (insert results))
(org-babel-import-elisp-from-file tmp-file))))))