From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Table formula changes are not always necessary when moving rows Date: Thu, 17 Mar 2011 07:03:29 +0100 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=37377 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q06J8-0003XO-PI for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 02:03:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q06J3-0005RG-NP for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 02:03:34 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:33580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q06J3-0005Qu-Ix for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 02:03:33 -0400 Received: by wwc33 with SMTP id 33so2761168wwc.30 for ; Wed, 16 Mar 2011 23:03:32 -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: Tom Cc: emacs-orgmode@gnu.org On 28.2.2011, at 12:43, Tom wrote: > I have a table in which I sum the values of all rows in the last > row: vsum(@1..@-I-1). The problem is when move a row with M-up > before the first row (e.g. I press M-up on the second row) then > org modifies this formula to vsum(@2..@-I-1). Hi Tom, I have thought a bit more about this issue. I do agree that, in particular when specifying ranges, it may not always desirable to have the formulas automatically adapt when rows and columns are swapped. I have just pushed a change that makes $< and @< refer in a stable way to the first column and row, respectively. You can also use @<<< to mean the second row and @>> the second to last row. I hope this will prove to be useful for such cases. Regards P.S. Nick (Dokos), I also added them to get the symmetry with the @> and $> references :) > > This is not always the expected behavior, because in this case I > just want to move the data in the rows, but still want to sum the > values of all the rows from the first to the last. A similar case > is when I want to insert a row before the first row of such a > table. In that case too the formulas should be left alone, > because I still want to sum all the rows, including the newly > inserted first row. > > In such cases when the formula is modified Org should either > print warning to the echo area, so the user notices when the > formulas are changing because of the move, or it should ask the > user what to do ("do you want to modify the formulas?"). > > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode