[Orgmode] Re: Patch for ob-sql.el SQL output

2010-12-22 Thread Sébastien Vauban
Hi Charles, Charles Sebold wrote: > What do you think would be a good solution for the blank between the output > of a table and the row count if someone didn't run SET NOCOUNT ON? > > I mean, should that be another hline, or no blank line, or what? > > If somebody's trying to programatically use

[Orgmode] Re: Patch for ob-sql.el SQL output

2010-12-22 Thread Sébastien Vauban
Hi Charles and Eric, "Eric Schulte" wrote: > This looks great, I've just applied this most recent patch. For the SQL code blocks I currently play with (and with the `msosql' engine), it works great: - hline correctly outputted - last blank line correctly removed Thanks! Best regards, Seb --

Re: [Orgmode] Re: Patch for ob-sql.el SQL output

2010-12-21 Thread Charles Sebold
Sébastien: What do you think would be a good solution for the blank between the output of a table and the row count if someone didn't run SET NOCOUNT ON? I mean, should that be another hline, or no blank line, or what? If somebody's trying to programatically use this table, it will mess up their

Re: [Orgmode] Re: Patch for ob-sql.el SQL output

2010-12-21 Thread Eric Schulte
Hi Charles, This looks great, I've just applied this most recent patch. Thanks -- Eric Charles Sebold writes: > OK, another change: added a fix for the blank line at the end. > > diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el > index 5bb123d..2ff85d9 100644 > --- a/lisp/ob-sql.el > +++ b/lisp/ob

Re: [Orgmode] Re: Patch for ob-sql.el SQL output

2010-12-21 Thread Charles Sebold
OK, another change: added a fix for the blank line at the end. diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el index 5bb123d..2ff85d9 100644 --- a/lisp/ob-sql.el +++ b/lisp/ob-sql.el @@ -65,6 +65,7 @@ This function is called by `org-babel-execute-src-block'." (in-file (org-babel-temp-file "

Re: [Orgmode] Re: Patch for ob-sql.el SQL output

2010-12-21 Thread Charles Sebold
I feel silly. I was just testing with one output column. Change the $ in the regexp to "[^-]" or just reapply patch as follows: diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el index 5bb123d..32b7bf0 100644 --- a/lisp/ob-sql.el +++ b/lisp/ob-sql.el @@ -65,6 +65,7 @@ This function is called by `org-b

[Orgmode] Re: Patch for ob-sql.el SQL output

2010-12-21 Thread Sébastien Vauban
Hi Charles, Charles Sebold wrote: > I use org-mode and babel under Windows with osql, and the line separating > the header from the rest of the rows in the output was bothering me. Excellent initiative! > I don't know that this is a really good fix, but maybe it's a start for one? > It looks for