summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <eric.schulte@gmx.com>2012-02-18 14:49:49 -0700
committerEric Schulte <eric.schulte@gmx.com>2012-02-18 14:49:59 -0700
commit60176c84e5fe5dab9633339d6738312066ade289 (patch)
treee55399c2f03aac55317026c7adf9179ed32fbefc
parent19f1bf6bce8602725acb36691af2367d0a10e78e (diff)
downloadorg-mode-60176c84e5fe5dab9633339d6738312066ade289.tar.gz
specify "," as default sqlite output seperator
* lisp/ob-sqlite.el (org-babel-execute:sqlite): Specify the use of "," as the separator to `org-table-convert-region'. Fixes errors when only one result per line of output.
-rw-r--r--lisp/ob-sqlite.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ob-sqlite.el b/lisp/ob-sqlite.el
index edd230e..2439257 100644
--- a/lisp/ob-sqlite.el
+++ b/lisp/ob-sqlite.el
@@ -93,7 +93,14 @@ This function is called by `org-babel-execute-src-block'."
(member "code" result-params)
(equal (point-min) (point-max)))
(buffer-string)
- (org-table-convert-region (point-min) (point-max))
+ (org-table-convert-region (point-min) (point-max)
+ (if (or (member :csv others)
+ (member :column others)
+ (member :line others)
+ (member :list others)
+ (member :html others) separator)
+ nil
+ '(4)))
(org-babel-sqlite-table-or-scalar
(org-babel-sqlite-offset-colnames
(org-table-to-lisp) headers-p))))))