org-table.el: Fix bug about handling remote references as durations.

* org-table.el (org-table-eval-formula): Fix bug about
handling remote references as durations.

Thanks to Sébastien Vauban for reporting this.
This commit is contained in:
Bastien Guerry 2012-04-11 00:43:05 +02:00
parent 9586c880b7
commit 7d8c5c66e9
1 changed files with 7 additions and 2 deletions

View File

@ -2526,8 +2526,13 @@ not overwrite the stored one."
(replace-match
(save-match-data
(org-table-make-reference
(org-table-get-remote-range
(match-string 1 form) (match-string 2 form))
(let ((rmtrng (org-table-get-remote-range
(match-string 1 form) (match-string 2 form))))
(if duration
(if (listp rmtrng)
(mapcar (lambda(x) (org-table-time-string-to-seconds x)) rmtrng)
(org-table-time-string-to-seconds rmtrng))
rmtrng))
keep-empty numbers lispp))
t t form)))
;; Insert complex ranges