Thierry Banel <tbanelweb...@free.fr> writes: > Do you recommend to stay away from CL & CL-LIB for ORG stuff ? > `DOLIST' comes from CL as well...
Actually, `dolist' is a macro from "subr.el", which is then shadowed by `cl-dolist', so there's no problem here. BTW, you can use macros from cl (cl-lib doesn't exist in Emacs 23), not so functions. > > IOW, you need to eliminate the leading 'hline, if any,and skip until > the next 'hline if there is one and if there is something after it. > > Ok. Not completely fool-proof, but better. > > > Do you think of another case that wouldn't be covered by this? > > 1st case: a header and several hlines. > In this case, values 1,2,3 will be ignored. > > | header | > |--------| <-- leading hline: skipped > | 1 | > | 2 | > | 3 | > |--------| <-- next hline: ignore whatever is before > | 4 | > | 5 | > | 6 | I wasn't clear. A "leading hline" is when the very first row is a hline (or worse consecutive hlines start the table). In the example above, there is no such leading hline, so you don't eliminate it. Therefore, only header will be skipped. > 2nd case: no header at all, values in boxes. > Values 1,2,3 will be ignored as well. > > |--------| <-- leading hline: skipped > | 1 | > | 2 | > | 3 | > |--------| <-- next hline: ignore whatever is before > | 4 | > | 5 | > | 6 | > |--------| <-- last hline There is a header. By definition, anything in the first column group is a header. There is no limitations on the number of rows involved. It may be a bit surprising, but this is consistent with the rest of Org. > The only ill-interpreted case is this one, with no header. > The first values are considered as headers: > > |---+----| > | 3 | | <-- formula not applied > | 4 | | <-- formula not applied > |---+----| > | 5 | 50 | > | 6 | 60 | > |---+----| > #+TBLFM: $2=$1*10 See above. Regards, -- Nicolas Goaziou