From e32a45ed36d6000db4b39171149072d11b77af72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Delafond?= Date: Sun, 13 Jul 2014 13:35:27 +0200 Subject: Imported Upstream version 8.0.7 --- lisp/ob-sh.el | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'lisp/ob-sh.el') 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)))))) -- cgit v1.2.3