mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-12-03 08:30:03 +00:00
org.el (org-refresh-stats-properties): Fix arithmetic error
* org.el (org-refresh-stats-properties): Fix arithmetic error. Thanks to Gregor Zattler for reporting this.
This commit is contained in:
parent
99580828e6
commit
253b60cdaf
@ -9433,10 +9433,11 @@ call CMD."
|
||||
(concat org-outline-regexp-bol ".*"
|
||||
"\\(?:\\[\\([0-9]+\\)%\\|\\([0-9]+\\)/\\([0-9]+\\)\\]\\)")
|
||||
nil t)
|
||||
(setq stats (if (match-string 2)
|
||||
(/ (* (string-to-number (match-string 2)) 100)
|
||||
(string-to-number (match-string 3)))
|
||||
(string-to-number (match-string 1))))
|
||||
(setq stats (cond ((equal (match-string 3) "0") 0)
|
||||
((match-string 2)
|
||||
(/ (* (string-to-number (match-string 2)) 100)
|
||||
(string-to-number (match-string 3))))
|
||||
(t (string-to-number (match-string 1)))))
|
||||
(org-back-to-heading t)
|
||||
(put-text-property (point) (progn (org-end-of-subtree t t) (point))
|
||||
'org-stats stats)))))))
|
||||
|
Loading…
Reference in New Issue
Block a user