From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Banel Subject: Re: table formula help... Date: Sat, 06 Dec 2014 23:49:41 +0100 Message-ID: <54838805.8090705@free.fr> References: <87ppbxfi5f.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxOAb-0006z2-BE for emacs-orgmode@gnu.org; Sat, 06 Dec 2014 17:49:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XxOAa-0008Ne-4M for emacs-orgmode@gnu.org; Sat, 06 Dec 2014 17:49:45 -0500 Received: from smtp4-g21.free.fr ([2a01:e0c:1:1599::13]:20472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxOAZ-0008NW-Tp for emacs-orgmode@gnu.org; Sat, 06 Dec 2014 17:49:44 -0500 Received: from [IPv6:2a01:e35:2e21:def0:945c:654d:e692:22ed] (unknown [IPv6:2a01:e35:2e21:def0:945c:654d:e692:22ed]) by smtp4-g21.free.fr (Postfix) with ESMTP id BDB124C8044 for ; Sat, 6 Dec 2014 23:49:20 +0100 (CET) In-Reply-To: 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: emacs-orgmode@gnu.org To elaborate on Michael's first suggestion, we will first give a name ("work") to the table: #+TBLNAME: work | Chars | Lines | Translator | |-------+-------+-----------------| | | 84 | Austin Woerner | | 6633 | | Eric Abrahamsen | | 16984 | | Canaan Morse | | | 24 | Lucas Klein | | | 10 | Lucas Klein | Then typing C-c C-x i and answering the wizard questions, we get a new table as follow: #+BEGIN: aggregate :table "work" :cols "Translator sum(Chars) sum(Lines= )" | Translator | sum(Chars) | sum(Lines) | |-----------------+------------+------------| | Austin Woerner | NA | 84 | | Eric Abrahamsen | 6633 | NA | | Canaan Morse | 16984 | NA | | Lucas Klein | 2 NA | 34 | #+END: Whenever you change the "work" table, you can easily refresh the aggregated table by typing C-c C-c To install the orgtbl-aggregate module, add those lines to your .emacs: (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) (package-initialize) Then type M-x package-list-packages and install orgtbl-aggregate Have fun Thierry Le 06/12/2014 09:05, Michael Brand a =C3=A9crit : > Hi Eric > > On Sat, Dec 6, 2014 at 6:42 AM, Eric Abrahamsen wrote: >> #+NAME: counts >> | Piece | Chars | Lines | Translator | >> +----------------+--------+-------+------------------+ >> | =E5=87=A4=E5=87=B0 | | 84 | Austin Woerner | >> | =E7=8E=8B=E8=A1=80 | 6633 | | Eric Abrahamsen | >> | =E8=B5=B5=E6=B0=8F=E5=AD=A4=E5=84=BF | 16984 | | Canaan= Morse | >> | =E5=B1=B1=E9=AC=BC=E6=95=85=E5=AE=B6 | | 24 | Lucas = Klein | >> | =E5=AF=82=E9=9D=99=E4=BD=95=E5=85=B6=E6=B7=B1=E6=B2=89 | | = 10 | Lucas Klein | >> >> And the second: >> >> #+NAME: payments >> #+CONSTANTS: prose=3D0.7 poetry=3D10 >> | Translator | Total Chars | Total Lines | Payment | >> |------------------+-------------+-------------+---------| >> | Austin Woerner | | | | >> | Eric Abrahamsen | | | | >> | Canaan Morse | | | | >> | Lucas Klein | | | | > Thierry Banel recently announced orgaggregate: > http://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=3Demacs-orgmode= &max=3D100&sort=3Ddate:late&query=3D%2Bsubject:"%5BANN%5D+Aggregate+Table= " > > For a solution with only built-in functionality see the example > test-org-table/org-lookup-all in the Org source file > testing/lisp/test-org-table.el > http://orgmode.org/w/org-mode.git?p=3Dorg-mode.git;a=3Dblob;f=3Dtesting= /lisp/test-org-table.el > > Michael > >