summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2011-07-02 13:34:22 +0200
committerBastien Guerry <bzg@altern.org>2011-07-02 13:34:22 +0200
commit2e20cf9358deb9579ae6a22bc0deb2a772387194 (patch)
tree4e964f417b2a3d0149c093809aadd43ee66c364d
parent12687ad200dfd08c975c54baf7f630334a1ffedc (diff)
downloadorg-mode-2e20cf9358deb9579ae6a22bc0deb2a772387194.tar.gz
org-table.el: return correct duration string for Calc formulas.
-rw-r--r--lisp/org-table.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 1a3103c..e277f57 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2517,7 +2517,9 @@ not overwrite the stored one."
(or (fboundp 'calc-eval)
(error "Calc does not seem to be installed, and is needed to evaluate the formula"))
(setq ev (calc-eval (cons form modes)
- (if numbers 'num))))
+ (if numbers 'num))
+ ev (if duration (org-table-time-seconds-to-string
+ (string-to-number ev)))))
(when org-table-formula-debug
(with-output-to-temp-buffer "*Substitution History*"