summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-05-22 14:17:01 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-05-22 14:17:01 +0200
commit9fd562f35a7097a8cff74968b4f0f600498760a0 (patch)
treefa3dce5017ff5d07ecb09d973069a0f53f13427c
parentd7599e3f275c096cd7335c92fd6da942be97a0e9 (diff)
downloadorg-mode-9fd562f35a7097a8cff74968b4f0f600498760a0.tar.gz
org-colview: Update new summarized value only when necessary
* lisp/org-colview.el (org-columns--compute-spec): Make sure current and new values do not differ only by leading or trailing blanks before replacing the former by the latter. Reported-by: Hendrik Tews <hendrik@askra.de> <http://permalink.gmane.org/gmane.emacs.orgmode/113597>
-rw-r--r--lisp/org-colview.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 43922ad..64bf37d 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -1176,8 +1176,13 @@ properties drawers."
;; When PROPERTY exists in current node, even if empty,
;; but its value doesn't match the one computed, use
;; the latter instead.
- (when (and update value (not (equal value summary)))
- (org-entry-put (point) property summary)))
+ ;;
+ ;; Ignore leading or trailing white spaces that might
+ ;; have been introduced in summary, since those are not
+ ;; significant in properties value.
+ (let ((new-value (org-trim summary)))
+ (when (and update value (not (equal value new-value)))
+ (org-entry-put (point) property new-value))))
;; Add current to current level accumulator.
(when (or summary value-set)
(push (or summary value) (aref lvals level)))