Spreadsheet: Don't assume every last row filed has a formula

In a recent patch we have introduced names for all fields in the last
row.  This has lead to a bug, that Org thinks there might be a field
formula associated with those fields.  Now we check if there really is
one, and only in this case ask to overwrite it with a column formula.

Report by Henry Atting.
This commit is contained in:
Carsten Dominik 2008-12-22 23:10:32 +01:00
parent 6291b4d300
commit 951d117a47
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2008-12-22 Carsten Dominik <carsten.dominik@gmail.com>
* org-table.el (org-table-get-formula): Only ask to overwrite
field formula if there really is one.
* org-id.el (org-id-find): Allow the ID to be a symbol or a
number, by converting these to a string.

View File

@ -1722,13 +1722,14 @@ When NAMED is non-nil, look for a named equation."
(ref (format "@%d$%d" (org-table-current-dline)
(org-table-current-column)))
(refass (assoc ref stored-list))
(nameass (assoc name stored-list))
(scol (if named
(if (and name (not (string-match "^LR[0-9]+$" name)))
name
ref)
(int-to-string (org-table-current-column))))
(dummy (and (or name refass) (not named)
(not (y-or-n-p "Replace field formula with column formula? " ))
(dummy (and (or nameass refass) (not named)
(not (y-or-n-p "Replace existing field formula with column formula? " ))
(error "Abort")))
(name (or name ref))
(org-table-may-need-update nil)