From mboxrd@z Thu Jan 1 00:00:00 1970 From: w t <1218121@gmail.com> Subject: Re: noob question : In a table , how to update a formula when inserting a new line Date: Fri, 7 May 2010 20:48:38 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OAb1w-0006Er-90 for emacs-orgmode@gnu.org; Fri, 07 May 2010 23:48:44 -0400 Received: from [140.186.70.92] (port=43523 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OAb1u-0006Ej-1S for emacs-orgmode@gnu.org; Fri, 07 May 2010 23:48:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from <1218121@gmail.com>) id 1OAb1s-0006vC-Qb for emacs-orgmode@gnu.org; Fri, 07 May 2010 23:48:41 -0400 Received: from mail-gy0-f169.google.com ([209.85.160.169]:54210) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from <1218121@gmail.com>) id 1OAb1s-0006v4-Mi for emacs-orgmode@gnu.org; Fri, 07 May 2010 23:48:40 -0400 Received: by gyg4 with SMTP id 4so1698629gyg.0 for ; Fri, 07 May 2010 20:48:39 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matt Chastagnier Cc: emacs-orgmode@gnu.org On Fri, May 7, 2010 at 7:21 PM, Matt Chastagnier wr= ote: > Hi, > > I've just started with org-mode and have done several tutorials. But I'm > stuck with this problem for 3 hours : > > > I have : > > | item=A0=A0=A0 | quantity | > |---------+----------| > | laptop=A0 |=A0=A0=A0=A0=A0=A0=A0 4 | > | desktop |=A0=A0=A0=A0=A0=A0=A0 7 | > |---------+----------| > | Total=A0=A0 |=A0=A0=A0=A0=A0=A0 11 | > > #+TBLFM: @4$2=3Dvsum(@I..@II) > > I insert a new line [because I will want to add a new item] (M-S down) an= d > update the table (C-u C-c C-c) : > > | item=A0=A0=A0 | quantity | > |---------+----------| > | laptop=A0 |=A0=A0=A0=A0=A0=A0=A0 4 | > | desktop |=A0=A0=A0=A0=A0=A0=A0 7 | > |=A0=A0=A0=A0=A0=A0=A0=A0 |=A0=A0=A0=A0=A0=A0 11 | > |---------+----------| > | Total=A0=A0 |=A0=A0=A0=A0=A0=A0 11 | > > #+TBLFM: @4$2=3Dvsum(@I..@II) > > but my formula isn't updated automatically so the wrong field is updated.= I > would like the formula to become @5$2 instead of @4$2 automatically. Before editing the table make sure there is no blank line between the table and the line "#+TBLFM: @4$2=3Dvsum(@I..@II)". Then use the M-S- command.