Просмотр исходного кода

org-table.el: return correct duration string for Calc formulas.

Bastien Guerry 14 лет назад
Родитель
Сommit
2e20cf9358
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      lisp/org-table.el

+ 3 - 1
lisp/org-table.el

@@ -2517,7 +2517,9 @@ not overwrite the stored one."
 	  (or (fboundp 'calc-eval)
 	  (or (fboundp 'calc-eval)
 	      (error "Calc does not seem to be installed, and is needed to evaluate the formula"))
 	      (error "Calc does not seem to be installed, and is needed to evaluate the formula"))
 	  (setq ev (calc-eval (cons form modes)
 	  (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
 	(when org-table-formula-debug
 	  (with-output-to-temp-buffer "*Substitution History*"
 	  (with-output-to-temp-buffer "*Substitution History*"