summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2020-02-03 21:48:06 +0100
committerBastien <bzg@gnu.org>2020-02-03 21:48:06 +0100
commitcb19f5c94e3dc94da78169ec675d5bd07af34427 (patch)
tree58dd926576a345e3a1f1cce92bde1b69b4b40021
parent917917092d5a64b437e2ced31259bf56537a0e08 (diff)
downloadorg-mode-cb19f5c94e3dc94da78169ec675d5bd07af34427.tar.gz
org-agenda.el: Fix `org-agenda-get-blocks'
* lisp/org-agenda.el (org-agenda-get-blocks): When both dates are of the same value, assume this is a time to display for each date in the range. Thanks to David Masterson for reporting this.
-rw-r--r--lisp/org-agenda.el20
1 files changed, 13 insertions, 7 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index c2789da..a98bab2 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6482,7 +6482,6 @@ scheduled items with an hour specification like [h]h:mm."
(and (eq org-agenda-show-inherited-tags t)
(or (eq org-agenda-use-tag-inheritance t)
(memq 'agenda org-agenda-use-tag-inheritance))))
-
tags (org-get-tags nil (not inherited-tags)))
(setq level (make-string (org-reduced-level (org-outline-level)) ? ))
(looking-at "\\*+[ \t]+\\(.*\\)")
@@ -6500,12 +6499,19 @@ scheduled items with an hour specification like [h]h:mm."
org-agenda-timerange-leaders)
(1+ (- d0 d1)) (1+ (- d2 d1)))
head level category tags
- (cond ((and (= d1 d0) (= d2 d0))
- (concat "<" start-time ">--<" end-time ">"))
- ((= d1 d0)
- (concat "<" start-time ">"))
- ((= d2 d0)
- (concat "<" end-time ">")))
+ (save-match-data
+ (let ((hhmm1 (and (string-match org-ts-regexp1 s1)
+ (match-string 6 s1)))
+ (hhmm2 (and (string-match org-ts-regexp1 s2)
+ (match-string 6 s2))))
+ (cond ((string= hhmm1 hhmm2)
+ (concat "<" start-time ">--<" end-time ">"))
+ ((and (= d1 d0) (= d2 d0))
+ (concat "<" start-time ">--<" end-time ">"))
+ ((= d1 d0)
+ (concat "<" start-time ">"))
+ ((= d2 d0)
+ (concat "<" end-time ">")))))
remove-re))))
(org-add-props txt props
'org-marker marker 'org-hd-marker hdmarker