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). > > 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?").
Aside to Bastien's help for this issue, a variable that will prompt you before the formulas are rewritten, consider this: Most of the time is should be possible to rewrite the formula in a stable way. You did not show your example, but from the formula I would assume that you start the table immediately with data, without a header line org a horizontal separator line. If you did, you could do vsum(@I..II) and have a formula that is stable against row switches. Hope this helps. - Carsten