summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-04-11 00:43:05 +0200
committerBastien Guerry <bzg@altern.org>2012-04-11 00:43:05 +0200
commit7d8c5c66e9a87d71d946eb14a855dd60e9b26bfb (patch)
treef31ccbd5f04e5d37394235c354a154d41182ad1b
parent9586c880b7dcb5b042d63e61f6460fb5b5bbb78b (diff)
downloadorg-mode-7d8c5c66e9a87d71d946eb14a855dd60e9b26bfb.tar.gz
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.
-rw-r--r--lisp/org-table.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 646518b..08981b5 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -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