diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-08-11 19:10:09 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-08-11 19:12:17 +0200 |
commit | 6116c72975c0ff8c4cd5d7998b206097800289fe (patch) | |
tree | 89d89e2d8e420a43885927068575d861b5489a45 | |
parent | e8253c57f14eb0cd2b01c6a38ed4f9150461180b (diff) | |
download | org-mode-6116c72975c0ff8c4cd5d7998b206097800289fe.tar.gz |
Fix column view sums
* lisp/org.el (org-entry-properties): Remove need for `org-summaries'
property.
* lisp/org-colview.el (org-columns--value): New function.
(org-columns):
(org-agenda-columns): Use new functions.
Reported-by: Johan Sandblom <js@ndblom.se>
<http://permalink.gmane.org/gmane.emacs.orgmode/99865>
-rw-r--r-- | lisp/org-colview.el | 14 | ||||
-rwxr-xr-x | lisp/org.el | 2 |
2 files changed, 10 insertions, 6 deletions
diff --git a/lisp/org-colview.el b/lisp/org-colview.el index e0dd65c..6dba03c 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -146,6 +146,11 @@ This is the compiled version of the format.") "--" ["Quit" org-columns-quit t])) +(defun org-columns--value (property pos) + "Return value for PROPERTY at buffer position POS" + (or (cdr (assoc-string property (get-text-property pos 'org-summaries) t)) + (org-entry-get pos property 'selective t))) + (defun org-columns-new-overlay (beg end &optional string face) "Create a new column overlay and add it to the list." (let ((ov (make-overlay beg end))) @@ -710,10 +715,9 @@ When COLUMNS-FMT-STRING is non-nil, use it as the column format." (org-map-entries (lambda () (cons (point) - (mapcar - (lambda (p) - (cons p (org-entry-get nil p 'selective t))) - column-names))) + (mapcar (lambda (p) + (cons p (org-columns--value p (point)))) + column-names))) nil nil (and org-columns-skip-archived-trees 'archive)))) (when cache (org-set-local 'org-columns-current-maxwidths @@ -1410,7 +1414,7 @@ and tailing newline characters." (org-with-point-at m (mapcar (lambda (name) - (let ((value (org-entry-get (point) name 'selective t))) + (let ((value (org-columns--value name (point)))) (cons name (if (and org-agenda-columns-add-appointments-to-effort-sum diff --git a/lisp/org.el b/lisp/org.el index cbc9f9b..0232091 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -15861,7 +15861,7 @@ strings." (push (cons "CATEGORY" (org-get-category beg)) props) (when (string= specific "CATEGORY") (throw 'exit props))) ;; Return value. - (append (get-text-property beg 'org-summaries) props)))))) + props))))) (defun org-property--local-values (property literal-nil) "Return value for PROPERTY in current entry. |