From 6e7b6cae4fc515c0ed8b5bdc322f38e7087da078 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Fri, 28 Sep 2012 17:59:22 +0200 Subject: [PATCH] org-table.el: Warn with a message when formulas have been updated * org-table.el (org-table-fix-formulas): Warn with a message when formulas have been updated. --- lisp/org-table.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index 782e309d0..fa7ffd200 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -2179,7 +2179,8 @@ For all numbers larger than LIMIT, shift them by DELTA." (save-excursion (goto-char (org-table-end)) (when (let ((case-fold-search t)) (looking-at "[ \t]*#\\+tblfm:")) - (let ((re (concat key "\\([0-9]+\\)")) + (let ((msg "The formulas in #+TBLFM have been updated") + (re (concat key "\\([0-9]+\\)")) (re2 (when remove (if (or (equal key "$") (equal key "$LR")) @@ -2199,10 +2200,11 @@ For all numbers larger than LIMIT, shift them by DELTA." (setq s (match-string 1) n (string-to-number s)) (cond ((setq a (assoc s replace)) - (replace-match (concat key (cdr a)) t t)) + (replace-match (concat key (cdr a)) t t) + (message msg)) ((and limit (> n limit)) - (replace-match (concat key (int-to-string (+ n delta))) - t t))))))))) + (replace-match (concat key (int-to-string (+ n delta))) t t) + (message msg))))))))) (defun org-table-get-specials () "Get the column names and local parameters for this table."