From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Hannon Subject: Re: How to apply multiple TBLFM rules? Date: Tue, 8 May 2012 13:21:54 -0700 (PDT) Message-ID: <1336508514.23203.YahooMailNeo@web161906.mail.bf1.yahoo.com> References: <1336428054.18057.YahooMailNeo@web161903.mail.bf1.yahoo.com> <4FA8705A.4060907@verizon.net> <87d36fytvf.fsf@gnu.org> Reply-To: Michael Hannon Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRqv1-00028H-E0 for emacs-orgmode@gnu.org; Tue, 08 May 2012 16:22:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SRquy-0002ZI-7g for emacs-orgmode@gnu.org; Tue, 08 May 2012 16:21:58 -0400 Received: from nm21.bullet.mail.bf1.yahoo.com ([98.139.212.180]:33312) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SRqux-0002Yz-V1 for emacs-orgmode@gnu.org; Tue, 08 May 2012 16:21:56 -0400 In-Reply-To: <87d36fytvf.fsf@gnu.org> 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: Bastien , Charles Cc: "emacs-orgmode@gnu.org" Bastien wrote:=0A=0A> Charles writes:= =0A>=0A>> Perhaps only one #+TBLFM: per table is allowed=0A>=0A> More preci= sely, hitting C-c C-c on #+TBLFM: will just apply formulas in=0A> *this* li= ne.=0A>=0A> Using several #+TBLFM: lines is sometimes useful when you want = to apply=0A> different sets of formulas -- which I think is the use for #+T= BLFM: in=0A> Michael's document (but I agree this is confusing there.)=0A= =0AHi, Bastien.=A0 Thanks for looking into this.=A0 Let me start by saying = that I'm=0Acompletely satisfied with the mechanism of joining formulas with= the "::"=0Anotation, and especially with the convenient editing of such fo= rmulas with=0A"C-c '".=0A=0ABut if the multiple TBLFM lines work as I think= you're describing, then I=0Astill have some gap in my understanding.=0A=0A= Here's my simple test table, with multiple formulas, joined by "::":=0A=0A= =A0=A0=A0 #+TBLNAME: test1=0A=A0=A0=A0 | 1 | 2 |=A0=A0 |=0A=A0=A0=A0 | 4 | = 5 |=A0=A0 |=0A=A0=A0=A0 | 7 | 8 | 9 |=0A=A0=A0=A0 #+TBLFM: @1$3=3D'(+ 10 7)= ::@2$3=3D'(+ 11 9)::@3$1=3D42=0A=0AIf I hit C-c C-c while the point is on t= he one and only TBLFM line, I get:=0A=0A=A0=A0=A0 #+TBLNAME: test1=0A=A0=A0= =A0 |=A0 1 | 2 | 17 |=0A=A0=A0=A0 |=A0 4 | 5 | 20 |=0A=A0=A0=A0 | 42 | 8 |= =A0 9 =0A=A0=A0 =A0=0AI.e.,exactly the intended result.=0A=0AHere is the sa= me table, but with the formulas spread across three different=0Alines:=0A= =0A=A0=A0=A0 #+TBLNAME: test2=0A=A0=A0=A0 | 1 | 2 |=A0=A0 |=0A=A0=A0=A0 | 4= | 5 |=A0=A0 |=0A=A0=A0=A0 | 7 | 8 | 9 |=0A=A0=A0=A0 #+TBLFM: @1$3=3D'(+ 10= 7)=0A=A0=A0=A0 #+TBLFM: @2$3=3D'(+ 11 9)=0A=A0=A0=A0 #+TBLFM: @3$1=3D42=0A= =0AIf I hit C-c C-c while the point is on the FIRST TBLFM line, I get:=0A= =0A=A0=A0=A0 #+TBLNAME: test2=0A=A0=A0=A0 | 1 | 2 | 17 |=0A=A0=A0=A0 | 4 | = 5 |=A0=A0=A0 |=0A=A0=A0=A0 | 7 | 8 |=A0 9 |=0A=0AThis is what I expected.= =A0 If I now proceed to hit C-c C-c while the point is=0Aon the SECOND TBLF= M line, I get:=0A=0A=0A=A0=A0=A0 #+TBLNAME: test2=0A=A0=A0=A0 | 1 | 2 | 17 = |=0A=A0=A0=A0 | 4 | 5 |=A0=A0=A0 |=0A=A0=A0=A0 | 7 | 8 |=A0 9 |=0A=A0=A0 = =A0=0AI.e., there is no change whatsoever.=A0 If I then hit C-c C-c while t= he point is=0Aon the THIRD TBLFM line, I get:=0A=0A=A0=A0=A0 #+TBLNAME: tes= t2=0A=A0=A0=A0 | 1 | 2 | 17 |=0A=A0=A0=A0 | 4 | 5 |=A0=A0=A0 |=0A=A0=A0=A0 = | 7 | 8 |=A0 9 |=0A=A0=A0 =A0=0AI.e., again there is no change whatsoever.= =0A=0AI might add that if I do carry out these operations with table debugg= ing=0Aturned on (C-c {), I do NOT get prompted by the debugger when trying = to=0Aprocess the second and third TBLFM lines.=0A=0AAs I said above, I'm ha= ppy with the "::" solution and am happy to let this=0Atopic drop, but I'm e= ager to expand my Org-mode skills.=A0 Please let me know=0Awhat I'm missing= .=0A=0AThanks again.=0A=0A-- Mike