forked from mirrors/org-mode
Merge branch 'maint'
This commit is contained in:
commit
b5f5d66d8f
|
@ -1068,7 +1068,7 @@ display, or in the #+COLUMNS line of the current buffer."
|
|||
(defun org-nofm-to-completion (n m &optional percent)
|
||||
(if (not percent)
|
||||
(format "[%d/%d]" n m)
|
||||
(format "[%d%%]"(floor (+ 0.5 (* 100. (/ (* 1.0 n) m)))))))
|
||||
(format "[%d%%]" (round (* 100.0 n) m))))
|
||||
|
||||
|
||||
(defun org-columns-string-to-number (s fmt)
|
||||
|
|
|
@ -2573,7 +2573,8 @@ With optional prefix argument ALL, do this for the whole buffer."
|
|||
(total (nth 4 cookie)))
|
||||
(goto-char beg)
|
||||
(insert
|
||||
(if percent (format "[%d%%]" (/ (* 100 checked) (max 1 total)))
|
||||
(if percent (format "[%d%%]" (floor (* 100.0 checked)
|
||||
(max 1 total)))
|
||||
(format "[%d/%d]" checked total)))
|
||||
(delete-region (point) (+ (point) (- end beg)))
|
||||
(when org-auto-align-tags (org-fix-tags-on-the-fly)))))))
|
||||
|
|
|
@ -497,7 +497,9 @@ as `org-src-fontify-natively' is non-nil."
|
|||
(delete-region (point-min) (point-max))
|
||||
(insert string " ") ;; so there's a final property change
|
||||
(unless (eq major-mode lang-mode) (funcall lang-mode))
|
||||
(font-lock-ensure)
|
||||
;; Avoid `font-lock-ensure', which does not display fonts in
|
||||
;; source block.
|
||||
(font-lock-fontify-buffer)
|
||||
(setq pos (point-min))
|
||||
(while (setq next (next-single-property-change pos 'face))
|
||||
(put-text-property
|
||||
|
|
|
@ -4549,7 +4549,8 @@ is nil, return nil unconditionally."
|
|||
(goto-char (point-min))
|
||||
(while (re-search-forward org-table-any-line-regexp nil t)
|
||||
(unless quietly
|
||||
(message "Mapping tables: %d%%" (/ (* 100.0 (point)) (buffer-size))))
|
||||
(message "Mapping tables: %d%%"
|
||||
(floor (* 100.0 (point)) (buffer-size))))
|
||||
(beginning-of-line 1)
|
||||
(when (and (looking-at org-table-line-regexp)
|
||||
;; Exclude tables in src/example/verbatim/clocktable blocks
|
||||
|
@ -12966,7 +12967,8 @@ statistics everywhere."
|
|||
(outline-next-heading)))
|
||||
(setq new
|
||||
(if is-percent
|
||||
(format "[%d%%]" (/ (* 100 cnt-done) (max 1 cnt-all)))
|
||||
(format "[%d%%]" (floor (* 100.0 cnt-done)
|
||||
(max 1 cnt-all)))
|
||||
(format "[%d/%d]" cnt-done cnt-all))
|
||||
ndel (- (match-end 0) checkbox-beg))
|
||||
;; handle overlays when updating cookie from column view
|
||||
|
|
Loading…
Reference in a new issue