Browse Source

org-table: Fix formula at column insert

* lisp/org-table.el (org-table-insert-column): Fix the index.

Report and fix by Yu Han Quek.  https://lists.gnu.org/archive/html/emacs-orgmode/2020-03/msg00290.html

TINYCHANGE
Marco Wahl 5 years ago
parent
commit
fe34a408f2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lisp/org-table.el

+ 2 - 2
lisp/org-table.el

@@ -1307,8 +1307,8 @@ However, when FORCE is non-nil, create new columns if necessary."
     ;; Fix TBLFM formulas, if desirable.
     (when (or (not org-table-fix-formulas-confirm)
 	      (funcall org-table-fix-formulas-confirm "Fix formulas? "))
-      (org-table-fix-formulas "$" nil (1- col) 1)
-      (org-table-fix-formulas "$LR" nil (1- col) 1))))
+      (org-table-fix-formulas "$" nil col 1)
+      (org-table-fix-formulas "$LR" nil col 1))))
 
 (defun org-table-find-dataline ()
   "Find a data line in the current table, which is needed for column commands.