Browse Source

org-table: Fix `org-table-current-field-formula'

* lisp/org-table.el (org-table-current-field-formula): Column formulas
  are stored with a leading dollar sign.  Also raise an error when no
  field applies, unless NOERROR is non-nil.

* lisp/org-table.el (org-table-eval-formula): Remove unnecessary error.
Nicolas Goaziou 9 years ago
parent
commit
e79e437c32
1 changed files with 1 additions and 2 deletions
  1. 1 2
      lisp/org-table.el

+ 1 - 2
lisp/org-table.el

@@ -2174,7 +2174,7 @@ with \"=\" or \":=\"."
 					       (line-beginning-position))
 				  col)
 			    org-table-named-field-locations)))
-	 (scol (int-to-string col))
+	 (scol (format "$%d" col))
 	 (ref (format "@%d$%d" (org-table-current-dline) col))
 	 (stored-list (org-table-get-stored-formulas noerror))
 	 (ass (or (assoc name stored-list)
@@ -2664,7 +2664,6 @@ not overwrite the stored one."
   (or suppress-analysis (org-table-analyze))
   (if (equal arg '(16))
       (let ((eq (org-table-current-field-formula)))
-	(or eq (user-error "No equation active for current field"))
 	(org-table-get-field nil eq)
 	(org-table-align)
 	(setq org-table-may-need-update t))