Merge branch 'maint'

This commit is contained in:
Marco Wahl 2020-03-30 23:23:33 +02:00
commit 31d1bf86a3
2 changed files with 12 additions and 2 deletions

View File

@ -1368,8 +1368,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.

View File

@ -2394,6 +2394,16 @@ See also `test-org-table/copy-field'."
(org-table-insert-column)
(buffer-string)))))
(ert-deftest test-org-table/insert-column-with-formula ()
"Test `org-table-insert-column' with a formula in place."
(should
(equal "| 1 | | 1 | 2 |
#+TBLFM: $4=$1+$3"
(org-test-with-temp-text
"| 1<point> | 1 | 2 |
#+TBLFM: $3=$1+$2"
(org-table-insert-column)
(buffer-substring-no-properties (point-min) (point-max))))))
;;; Moving single cells