Jelajahi Sumber

org-table: Fix #ERROR in table formula with "@>"

* lisp/org-table.el (org-table-eval-formula): Expand first and last
  references into proper fields coordinates before replacing ranges.

Reported-by: Pablo S. Casas <pabloscasas@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/105895>
Nicolas Goaziou 9 tahun lalu
induk
melakukan
0b077de733
1 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 3 2
      lisp/org-table.el

+ 3 - 2
lisp/org-table.el

@@ -2738,9 +2738,10 @@ not overwrite the stored one."
 	      (setq fmt (replace-match "" t t fmt)))
 	    (unless (string-match "\\S-" fmt)
 	      (setq fmt nil))))
-      (if (and (not suppress-const) org-table-formula-use-constants)
-	  (setq formula (org-table-formula-substitute-names formula)))
+      (when (and (not suppress-const) org-table-formula-use-constants)
+	(setq formula (org-table-formula-substitute-names formula)))
       (setq orig (or (get-text-property 1 :orig-formula formula) "?"))
+      (setq formula (org-table-formula-handle-first/last-rc formula))
       (while (> ndown 0)
 	(setq fields (org-split-string
 		      (org-trim