From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: very long table calc expressions ? Date: Fri, 22 Jun 2018 09:16:56 -0400 Message-ID: <874lhvnepj.fsf@norang.ca> References: <87k1qu1yl5.fsf@mat.ucm.es> <87d0wknelv.fsf@norang.ca> <87a7rnglnq.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWLw0-0002eN-JQ for emacs-orgmode@gnu.org; Fri, 22 Jun 2018 09:17:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWLvx-0004Q0-Ec for emacs-orgmode@gnu.org; Fri, 22 Jun 2018 09:17:04 -0400 Received: from outbound1b.ore.mailhop.org ([54.200.247.200]:28760) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fWLvx-0004PO-8V for emacs-orgmode@gnu.org; Fri, 22 Jun 2018 09:17:01 -0400 Received: from localhost.localdomain (gollum.intra.norang.ca [192.168.1.5]) by mail.norang.ca (8.14.4/8.14.4/Debian-4) with ESMTP id w5MDGufP025594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 22 Jun 2018 09:16:57 -0400 Received: from localhost.localdomain (gollum [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3/Debian-9.4) with ESMTP id w5MDGuww028032 for ; Fri, 22 Jun 2018 09:16:56 -0400 In-Reply-To: <87a7rnglnq.fsf@mat.ucm.es> (Uwe Brauer's message of "Fri, 22 Jun 2018 12:28:41 +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" To: emacs-orgmode@gnu.org Uwe Brauer writes: > > Uwe Brauer writes: > > Hello Bernt, > > Hi Uwe, > > > You can edit or view the table formulas with C-c ' in case that helps. > > This splits the formulas one per line for editing. > > Thanks for pointing this out to me, but I seem unable to do it. > > When I use C-c ' I obtain that very long formula in a special buffer, > but it is again a long line. Breaking this line and then using C-c C-c > cuts the second line. So this is not what I was looking for, but maybe I > misunderstood something fundamental. When I hit C-c ' in this table #+TBLNAME: stat-final2 | | Frequency | |----+-----------| | SS | | | AP | 5 | | NT | 3 | | SB | #ERROR | | MH | 2 | | NP | 3 | #+TBLFM: @>$2='(length (org-lookup-all "NP" '(remote(data,@2$2..@>I$2)) nil))::@>>$2='(length (org-lookup-all "MH" '(remote(data,@2$2..@>I$2)) nil))::@>>>$2='(length (org-lookup-all "SB" '\(remote(data,@2$2..@>I$2)) nil))::@>>>>$2='(length (org-lookup-all "NT" '(remote(data,@2$2..@>I$2)) nil))::@>>>>>$2='(length (org-lookup-all "AP" '(remote(data,@2$2..@>I$2)) nil)) I get a new window with this in it: # Field and Range Formulas @>$2 = '(length (org-lookup-all "NP" '(remote(data,@2$2..@>I$2)) nil)) @>>$2 = '(length (org-lookup-all "MH" '(remote(data,@2$2..@>I$2)) nil)) @>>>$2 = '(length (org-lookup-all "SB" '\(remote(data,@2$2..@>I$2)) nil)) @>>>>$2 = '(length (org-lookup-all "NT" '(remote(data,@2$2..@>I$2)) nil)) @>>>>>$2 = '(length (org-lookup-all "AP" '(remote(data,@2$2..@>I$2)) nil)) and I can edit individual lines and then C-c C-c or C-c ' again to exit and rebuild the formula line on the table. It seems to reverse the lines every other time I do it which is strange but it works for me. Regards, Bernt