Re: org-babel :colnames yes

2020-05-28 Thread ian martins
Nick Dokos wrote:

> Would this work for you?
>
> #+BEGIN_SRC elisp :colnames yes
>   '((one two) hline (1 3) (1 6))
> #+END_SRC
>

Yes, that works. Thanks.


Re: org-babel :colnames yes

2020-05-28 Thread ian martins
I figured out that inserting `hline' works for some languages.  consistent
behavior with ":colnames yes" would be ideal but this solves my problem.

#+BEGIN_SRC elisp
  '((one two) hline (1 3) (1 6))
#+END_SRC

On Thu, May 28, 2020 at 7:48 AM ian martins  wrote:

> Hello, I'm trying to figure out how to tell org that the first row of a
> src block result is a table header.
>
> from readthedocs
>  it
> looks like ":colnames yes" should do this, but I haven't been able to get
> it to work, and the code
> 
> doesn't appear to want that to happen. maybe that is special handling for
> R .
>
> #+BEGIN_SRC elisp :colnames yes
>   '((one two) (1 3) (1 6))
> #+END_SRC
>
> I'm expecting an hline in the output but do not find one.
>
> I know ":colnames '(one two)" works, but I don't know the header value
> until I've generated the table.
>
> -Ian
>


Re: org-babel :colnames yes

2020-05-28 Thread Nick Dokos
Would this work for you?

--8<---cut here---start->8---
#+BEGIN_SRC elisp :colnames yes
 '((one two) hline (1 3) (1 6))
#+END_SRC

#+RESULTS:
| one | two |
|-+-|
|   1 |   3 |
|   1 |   6 |

--8<---cut here---end--->8---

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler