Improve error message for invalid rows in org-table.el.

This commit is contained in:
Carsten Dominik 2008-05-28 14:11:33 +02:00
parent 51c05f9071
commit 236f6c7ff9
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2008-05-28 Carsten Dominik <dominik@science.uva.nl>
* org-table.el (org-table-recalculate): Improve error message if
the row number is invalid.
2008-05-27 Carsten Dominik <dominik@science.uva.nl> 2008-05-27 Carsten Dominik <dominik@science.uva.nl>
* org-archive.el (org-archive-save-context-info): Fix bugs in * org-archive.el (org-archive-save-context-info): Fix bugs in

View File

@ -2376,7 +2376,7 @@ With prefix arg ALL, do this for all lines in the table."
(goto-char beg) (goto-char beg)
(and all (message "Re-applying formulas to full table...")) (and all (message "Re-applying formulas to full table..."))
;; First find the named fields, and mark them untouchanble ;; First find the named fields, and mark them untouchable
(remove-text-properties beg end '(org-untouchable t)) (remove-text-properties beg end '(org-untouchable t))
(while (setq eq (pop eqlname)) (while (setq eq (pop eqlname))
(setq name (car eq) (setq name (car eq)
@ -2384,8 +2384,11 @@ With prefix arg ALL, do this for all lines in the table."
(and (not a) (and (not a)
(string-match "@\\([0-9]+\\)\\$\\([0-9]+\\)" name) (string-match "@\\([0-9]+\\)\\$\\([0-9]+\\)" name)
(setq a (list name (setq a (list name
(condition-case nil
(aref org-table-dlines (aref org-table-dlines
(string-to-number (match-string 1 name))) (string-to-number (match-string 1 name)))
(error (error "Invalid row number in %s"
name)))
(string-to-number (match-string 2 name))))) (string-to-number (match-string 2 name)))))
(when (and a (or all (equal (nth 1 a) thisline))) (when (and a (or all (equal (nth 1 a) thisline)))
(message "Re-applying formula to field: %s" name) (message "Re-applying formula to field: %s" name)