From 1849f391bc75e9e4e7dba9e8587f01532b6d7cdf Mon Sep 17 00:00:00 2001 From: Jan Seeger Date: Thu, 6 Jul 2017 17:19:10 +0200 Subject: [PATCH] org.el: Fix custom timestamps for date ranges * org.el (org-activate-dates): Change `org-activate-dates' to activate custom timestamps for both dates in date ranges. Formerly, only the second date would be activated. The reason was a misplaced `if'. Replaced it with `when'. Also added doc comments. TINYCHANGE --- lisp/org.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index bc4171d43..0126cfc00 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6208,9 +6208,10 @@ by a #." 'keymap org-mouse-map)) (org-rear-nonsticky-at (match-end 0)) (when org-display-custom-times - (if (match-end 3) - (org-display-custom-time (match-beginning 3) (match-end 3)) - (org-display-custom-time (match-beginning 1) (match-end 1)))) + ;; If it's a date range, activate custom time for second date. + (when (match-end 3) + (org-display-custom-time (match-beginning 3) (match-end 3))) + (org-display-custom-time (match-beginning 1) (match-end 1))) t)) (defvar-local org-target-link-regexp nil