From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: make orgtbl-ascii-plot easier to install Date: Wed, 27 Aug 2014 00:09:37 +0200 Message-ID: <87r402oqce.fsf@nicolasgoaziou.fr> References: <53C2ADB0.2010404@free.fr> <87oaw9wg3s.fsf@bzg.ath.cx> <53E7F088.8010401@free.fr> <87tx4zhcvs.fsf@nicolasgoaziou.fr> <53FCE574.3010307@free.fr> <87vbpfnghj.fsf@nicolasgoaziou.fr> <53FCFF47.4060805@free.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMOvH-0000qr-Cm for emacs-orgmode@gnu.org; Tue, 26 Aug 2014 18:09:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMOv7-0005Zn-6y for emacs-orgmode@gnu.org; Tue, 26 Aug 2014 18:09:03 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:50152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMOv7-0005Ze-0t for emacs-orgmode@gnu.org; Tue, 26 Aug 2014 18:08:53 -0400 In-Reply-To: <53FCFF47.4060805@free.fr> (Thierry Banel's message of "Tue, 26 Aug 2014 23:42:31 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Thierry Banel Cc: emacs-orgmode@gnu.org Thierry Banel 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