Ihor Radchenko <[email protected]> writes:
> So, I am thinking about something more intuitive like
> - :strip-colnames
> - :detach-colnames
I agree that the =:colnames <yes|no|nil>= header is confusing, but one
can just about get it by reading the passage from the manual carefully.
Possibly the manual could be made clearer yet with your formulations.
It seems to me that the names ':strip-colnames' and ':detach-colnames'
are also potentially misleading, because they only explicitly state that
column names will be removed, not that they will be re-attached. If
we're looking for a header name that makes more intuitive sense of the
'yes' and 'no' values, I'd maybe propose ':has-colnames'.
But I'm not sure any slight gains in clarity justify a breaking change
in the header name (and presumably in the ':rownames' header name as
well).
> The allowed values should also be yes, no, and 'auto (previously nil).
Would that still default to 'auto in the absence of any colnames header?
> Thoughts? Other ideas?
This is a bit on the side, but speaking of :colnames, we should perhaps
document that it also takes a list as an argument. The manual states:
The ‘colnames’ header argument accepts ‘yes’, ‘no’, or ‘nil’ values.
That sounds like an exhaustive list, and it's the only place where
colnames is indexed. It might be worth mentioning that one can also add
colnames to the output even if there aren't any to begin with, e.g.:
#+begin_src elisp :colnames '("Odd" "Even")
'((1 2) (3 4) (5 6))
#+end_src
#+RESULTS:
| Odd | Even |
|-----+------|
| 1 | 2 |
| 3 | 4 |
| 5 | 6 |
But I think this belongs under [[info:org#Results of Evaluation]] rather
than[[info:org#Environment of a Code Block]].
Regards,
Christian