From mboxrd@z Thu Jan 1 00:00:00 1970 From: Torsten Wagner Subject: Problem: Moving rows in a table changes vsum start and end Date: Fri, 28 Sep 2012 17:37:46 +0900 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THW54-00047r-Q1 for emacs-orgmode@gnu.org; Fri, 28 Sep 2012 04:38:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THW4y-0005zk-Dc for emacs-orgmode@gnu.org; Fri, 28 Sep 2012 04:37:54 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:52674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THW4y-0005zf-6Y for emacs-orgmode@gnu.org; Fri, 28 Sep 2012 04:37:48 -0400 Received: by weyu3 with SMTP id u3so1294890wey.0 for ; Fri, 28 Sep 2012 01:37:46 -0700 (PDT) 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: Org Mode Mailing List Hi, I just notice a funny row-shift effect, having a table with a field calculated by vsum. | Nr. | value | |-----+-------| | 1 | 5 | | 2 | 5 | | 3 | 5 | | 4 | 5 | | 5 | 5 | | 6 | 5 | |-----+-------| | Sum | 30 | #+TBLFM: @8$2=vsum(@2..@7) now shift (sort) the rows by using M-arrowup and M-arrowdown | Nr. | value | |-----+-------| | 1 | 5 | | 6 | 5 | | 5 | 5 | | 3 | 5 | | 4 | 5 | | 2 | 5 | |-----+-------| | Sum | 10 | #+TBLFM: @8$2=vsum(@2..@3) Check, the #+TBLM:-line changed too! This might be desired sometimes but might also trouble people if they do not give careful attention. I know someone could do | Nr. | value | |-----+-------| | 1 | 5 | | 6 | 5 | | 5 | 5 | | 3 | 5 | | 4 | 5 | | 2 | 5 | |-----+-------| | Sum | 30 | #+TBLFM: @8$2=vsum(@I..@II) But still I feel that people can too easily trap into wrong calculus. One solution, I could see is then whenever forms change "automagically" highlight this changes within the TBFM line, e.g., by a change of the background color in a similar way like matching parenthesis. That might help to make people more aware of it and shows which equations are affected by the current operation. All the best Torsten