Ver código fonte

org-colview: Fix estimate's summary

* lisp/org-colview.el (org-columns--summary-estimate): Per last
  commit, do not make use of printf, since values are not numbers.
Nicolas Goaziou 8 anos atrás
pai
commit
3e3e4e621b
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      lisp/org-colview.el

+ 3 - 3
lisp/org-colview.el

@@ -1299,7 +1299,7 @@ When PRINTF is non-nil, use it to format the result."
    (/ (apply #'+ (mapcar #'org-columns--age-to-seconds ages))
    (/ (apply #'+ (mapcar #'org-columns--age-to-seconds ages))
       (float (length ages)))))
       (float (length ages)))))
 
 
-(defun org-columns--summary-estimate (estimates printf)
+(defun org-columns--summary-estimate (estimates _)
   "Combine a list of estimates, using mean and variance.
   "Combine a list of estimates, using mean and variance.
 The mean and variance of the result will be the sum of the means
 The mean and variance of the result will be the sum of the means
 and variances (respectively) of the individual estimates."
 and variances (respectively) of the individual estimates."
@@ -1314,8 +1314,8 @@ and variances (respectively) of the individual estimates."
 	(`(,value) (cl-incf mean value))))
 	(`(,value) (cl-incf mean value))))
     (let ((sd (sqrt var)))
     (let ((sd (sqrt var)))
       (format "%s-%s"
       (format "%s-%s"
-	      (format (or printf "%.0f") (- mean sd))
-	      (format (or printf "%.0f") (+ mean sd))))))
+	      (format "%.0f" (- mean sd))
+	      (format "%.0f" (+ mean sd))))))