Achim Gratz <strom...@nexgo.de> writes:

> Eric Schulte writes:
>> This does look like a bug to me.  Can you isolate "where" the value of
>> data in your example is first assigned the wrong value?
>
> The error lies in how ob-sh tries to determine if it needs to process a
> table or a vector and then forgets to check for 'hline, thus ending up
> in the vector branch with the table data.
>
>> Thanks for reporting.  I will save your example for when I next have
>> development time.
>
> Here's a suggestion for a quick fix.  I've also implemented :hlines
> processing for ob-sh (it was ignoring that header arg unconditionally)
> and added an experimental header arg :hline-string to control how hlines
> get actually exported.  BTW, trailing blank lines in the output get
> swallowed when re-importing to Org, I'm not sure if that is supposed to
> happen or not.
>

This looks great.  Please go ahead and apply this patch to ob-sh.

>
> Giving ob-gnuplot (and possible ob-awk, which also uses
> orgtbl-to-generic) a similar treatment would allow to do this directly
> without going through ob.sh of course.
>

That sounds like a good solution to me.  Generally whenever a solution
may be made in a generic support function instead of a language specific
file I would consider that a win.  If you have a good implementation
here I'd be very happy if you applied it.

Cheers,

>
> Regards,
> Achim.

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

Reply via email to