mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-07-16 09:16:27 +00:00
org-colview.el (org-columns-display-here): Fix column view
* org-colview.el (org-columns-display-here): Fix the column view for numbers with a format specifier (e.g. {+; %5.1f}). Thanks to OSiUX and Michael Brand for reporting this.
This commit is contained in:
parent
9715523abe
commit
b84559f422
|
@ -174,7 +174,7 @@ This is the compiled version of the format.")
|
||||||
(face (list color font 'org-column ref-face))
|
(face (list color font 'org-column ref-face))
|
||||||
(face1 (list color font 'org-agenda-column-dateline ref-face))
|
(face1 (list color font 'org-agenda-column-dateline ref-face))
|
||||||
(cphr (get-text-property (point-at-bol) 'org-complex-heading-regexp))
|
(cphr (get-text-property (point-at-bol) 'org-complex-heading-regexp))
|
||||||
pom property ass width f string ov column val modval s2 title calc)
|
pom property ass width f fc string ov column val modval s2 title calc)
|
||||||
;; Check if the entry is in another buffer.
|
;; Check if the entry is in another buffer.
|
||||||
(unless props
|
(unless props
|
||||||
(if (eq major-mode 'org-agenda-mode)
|
(if (eq major-mode 'org-agenda-mode)
|
||||||
|
@ -204,6 +204,8 @@ This is the compiled version of the format.")
|
||||||
(nth 2 column)
|
(nth 2 column)
|
||||||
(length property))
|
(length property))
|
||||||
f (format "%%-%d.%ds | " width width)
|
f (format "%%-%d.%ds | " width width)
|
||||||
|
fm (nth 4 column)
|
||||||
|
fc (nth 5 column)
|
||||||
calc (nth 7 column)
|
calc (nth 7 column)
|
||||||
val (or (cdr ass) "")
|
val (or (cdr ass) "")
|
||||||
modval (cond ((and org-columns-modify-value-for-display-function
|
modval (cond ((and org-columns-modify-value-for-display-function
|
||||||
|
@ -215,13 +217,14 @@ This is the compiled version of the format.")
|
||||||
(org-columns-cleanup-item
|
(org-columns-cleanup-item
|
||||||
val org-columns-current-fmt-compiled
|
val org-columns-current-fmt-compiled
|
||||||
(or org-complex-heading-regexp cphr)))
|
(or org-complex-heading-regexp cphr)))
|
||||||
|
(fc (org-columns-number-to-string
|
||||||
|
(org-columns-string-to-number val fm) fm fc))
|
||||||
((and calc (functionp calc)
|
((and calc (functionp calc)
|
||||||
(not (string= val ""))
|
(not (string= val ""))
|
||||||
(not (get-text-property 0 'org-computed val)))
|
(not (get-text-property 0 'org-computed val)))
|
||||||
(org-columns-number-to-string
|
(org-columns-number-to-string
|
||||||
(funcall calc (org-columns-string-to-number
|
(funcall calc (org-columns-string-to-number
|
||||||
val (nth 4 column)))
|
val fm)) fm))))
|
||||||
(nth 4 column)))))
|
|
||||||
(setq s2 (org-columns-add-ellipses (or modval val) width))
|
(setq s2 (org-columns-add-ellipses (or modval val) width))
|
||||||
(setq string (format f s2))
|
(setq string (format f s2))
|
||||||
;; Create the overlay
|
;; Create the overlay
|
||||||
|
|
Loading…
Reference in a new issue