From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: [PATCH] Add check for assignment to hline relative references in table formulas. Date: Wed, 25 Sep 2013 13:57:49 -0400 Message-ID: <2a44af29883017d4a922e25399f34200@mail.rickster.com> References: <760e1f326345602d5fdfc3e9197444d2@mail.rickster.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOtLX-0000fd-Td for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 13:58:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOtLR-00070L-Ta for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 13:57:55 -0400 Received: from [204.62.15.78] (port=55615 helo=mail.rickster.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOtLR-00070G-Ps for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 13:57:49 -0400 In-Reply-To: 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: Carsten Dominik Cc: Org-Mode * org-table.el (org-table-recalculate): Generate user error if an hline relative reference is use on the LHS of a formula. --- lisp/org-table.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/org-table.el b/lisp/org-table.el index 246cf8d..a3197d3 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -3001,6 +3001,8 @@ known that the table will be realigned a little later anyway." ;; Insert constants in all formulas (setq eqlist (mapcar (lambda (x) + (if (string-match "^@-?I+" (car x)) + (user-error "Can't assign to hline relative reference")) (when (string-match "\\`$[<>]" (car x)) (setq lhs1 (car x)) (setq x (cons (substring -- 1.8.0