diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-02-23 14:20:19 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-02-23 15:19:59 +0100 |
commit | ab38d15186bfc91c51f93033445b9801ea1de7a3 (patch) | |
tree | 15d3525d92d61663c13328dde41886cc4032df06 | |
parent | 0de85fca9e40958610aa657153eda9ad9fcab606 (diff) | |
download | org-mode-ab38d15186bfc91c51f93033445b9801ea1de7a3.tar.gz |
org-colview: Tiny refactoring
* lisp/org-colview.el (org-columns--collect-values): Tiny refactoring.
-rw-r--r-- | lisp/org-colview.el | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 766eb00..47f2fc5 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -248,26 +248,26 @@ Return a list of triplets (SPEC VALUE DISPLAYED) suitable for This function assumes `org-columns-current-fmt-compiled' is initialized." - (mapcar - (lambda (spec) - (pcase spec - (`(,p . ,_) - (let* ((v (or (cdr - (assoc spec (get-text-property (point) 'org-summaries))) - (org-entry-get (point) p 'selective t) - (and agenda - ;; Effort property is not defined. Try to - ;; use appointment duration. - org-agenda-columns-add-appointments-to-effort-sum - (string= p (upcase org-effort-property)) - (get-text-property (point) 'duration) - (org-propertize - (org-minutes-to-clocksum-string - (get-text-property (point) 'duration)) - 'face 'org-warning)) - ""))) - (list spec v (org-columns--displayed-value spec v)))))) - org-columns-current-fmt-compiled)) + (let ((summaries (get-text-property (point) 'org-summaries))) + (mapcar + (lambda (spec) + (pcase spec + (`(,p . ,_) + (let* ((v (or (cdr (assoc spec summaries)) + (org-entry-get (point) p 'selective t) + (and agenda + ;; Effort property is not defined. Try + ;; to use appointment duration. + org-agenda-columns-add-appointments-to-effort-sum + (string= p (upcase org-effort-property)) + (get-text-property (point) 'duration) + (org-propertize + (org-minutes-to-clocksum-string + (get-text-property (point) 'duration)) + 'face 'org-warning)) + ""))) + (list spec v (org-columns--displayed-value spec v)))))) + org-columns-current-fmt-compiled))) (defun org-columns--set-widths (cache) "Compute the maximum column widths from the format and CACHE. |