From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [bug, org-table] new hline doesn't update formula Date: Sun, 17 May 2015 21:06:31 +0200 Message-ID: <87h9rbxbuw.fsf@gmx.us> References: <87zj55wxri.fsf@gmx.us> <87y4kn6nd2.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yu3tf-0003eO-Qb for emacs-orgmode@gnu.org; Sun, 17 May 2015 15:06:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yu3tc-0007El-LC for emacs-orgmode@gnu.org; Sun, 17 May 2015 15:06:47 -0400 Received: from plane.gmane.org ([80.91.229.3]:36253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yu3tc-0007D8-EA for emacs-orgmode@gnu.org; Sun, 17 May 2015 15:06:44 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Yu3tZ-0002TA-UN for emacs-orgmode@gnu.org; Sun, 17 May 2015 21:06:42 +0200 Received: from 71.red-88-19-189.staticip.rima-tde.net ([88.19.189.71]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 May 2015 21:06:41 +0200 Received: from rasmus by 71.red-88-19-189.staticip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 May 2015 21:06:41 +0200 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 Nicolas Goaziou writes: > Hello, > > Rasmus writes: > >> Consider this example: >> >> |---+---+---| >> | a | b | c | >> | d | e | f | >> |---+---+---| >> | 1 | 2 | 3 | >> | 4 | 5 | 6 | >> |---+---+---| >> | 5 | 7 | 9 | >> #+TBLFM: @5=vsum(@II..@III) >> >> Insert a hline after |a|b|c|. The formula is now broken. > > What should happen to the formula if hline is inserted between |1|2|3| > and |4|5|6|? Good question. I'm not sure. While not necessarily the most obvious I think in that case the formula should be unchanged. But it's not obvious. >> Expected behavior: org-table-insert-hline should call >> org-table-fix-formulas, though this does not currently support hlines, it >> seems. >> >> I have no idea how trivial or hard this is to fix this... But hints or >> fixes are appreciated. > > It doesn't seem too hard to fix. I think we just need to extend > `org-table-fix-formulas' to handle "@I" parts and call it from > `org-table-insert-hline'. I guess something like that. > Anyway, actual fix depends on the answer to my initial question. Yeah... —Rasmus -- . . . The proofs are technical in nature and provides no real understanding