diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-03-25 22:17:08 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-03-25 22:33:06 +0100 |
commit | 0b077de733082fc171ee67760b0f04dd306f7a5a (patch) | |
tree | bf5708d69093e34b6e7759d68889751af4b49da0 | |
parent | 780445c0aa4c5e0918280e4368b02bd755d1de08 (diff) | |
download | org-mode-0b077de733082fc171ee67760b0f04dd306f7a5a.tar.gz |
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>
-rw-r--r-- | lisp/org-table.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el index ba06335..c6eb337 100644 --- a/lisp/org-table.el +++ b/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 |