[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] ob-sql error because of not specifying column-seperator
From: |
Eric Schulte |
Subject: |
Re: [Orgmode] ob-sql error because of not specifying column-seperator |
Date: |
Fri, 03 Dec 2010 06:59:38 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Applied, Thanks for the patch -- Eric
Joost Helberg <address@hidden> writes:
> Hi,
>
> when using babel SQL, the column's in the resultset are converted to
> org-tables using (org-table-import file sep).
>
> The command used to retrieve the information from the databaseserver
> gets the option to use the tab (\t) as columnseperator.
>
> The call to org-table-import however doesn't specify this
> seperator. This leaves it to org-table-import to find out what the
> seperator is. org-table-import doesn't always succeed in this. Hence
> the diff below which sets the seperator to <tab> (\t).
>
> regards,
>
> Joost Helberg
>
> diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
> index 19c271d..6bb9a96 100644
> --- a/lisp/ob-sql.el
> +++ b/lisp/ob-sql.el
> @@ -80,7 +80,7 @@ This function is called by `org-babel-execute-src-block'."
> (message command)
> (shell-command command)
> (with-temp-buffer
> - (org-table-import out-file nil)
> + (org-table-import out-file '(16))
> (org-babel-reassemble-table
> (org-table-to-lisp)
> (org-babel-pick-name (cdr (assoc :colname-names params))