emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] allow for multiline headers


From: Mario Frasca
Subject: Re: [PATCH] allow for multiline headers
Date: Sat, 13 Jun 2020 15:20:01 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

hi Nicolas,

is there an agreement on cl-lib usage within the project?  I was hinted at cl-loop in this mailing list, and I liked it, in particular the `collect' clause, the destructuring feature, and less parentheses.  I had no exposure to cl-loop before the hint received here.

I can leave existing loops in peace, or edit them keeping them cl-loop-free.  as for myself, I find it practical and readable. let's say I'll try to limit usage.

On 12/06/2020 17:44, Nicolas Goaziou wrote:
Also, the first hline is used to determine where to end the header.
A table starting with a hline has no header. Therefore, I suggest to
avoid removing hlines at the beginning of a table, we would lose
information.

this is not a correct description of the current status, at least not within org-plot.

(let ((table (org-table-to-lisp)) …

in org-plot we expect either the first or the second element of `table' to be a list;

any leading `hline' is removed;

if the second element of `table' is a hline, the first element of `table' is considered to be the header (in this case -and only in this case- any subsequent `hline' is then removed from `table');

the presence of hline elements in `table' will crash the routine.

----------------------

a table looking like hline-header-hline-data is treated as having a header, while your description says it's all data, no header, because of the leading hline.

but in my opinion if there's any problem or misunderstanding here, it's because there's no unit tests that describe the correct behaviour.  can we work at that?

in fact, there's not even a org-table-headers function, that would return the table headers.

anyhow, what do you think of the multiple-lines-header option?

MF




reply via email to

[Prev in Thread] Current Thread [Next in Thread]