summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-10-17 17:22:58 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2012-10-17 17:22:58 +0200
commit10f1c32f6d40696e91922f3a7f28946fe28e8548 (patch)
tree32bfb7dd0ba353ef18f0e3d60a18105b4163aa02
parent9497098dd4fec1424bcb45b8b52d21e4d9adda17 (diff)
parent92199873c5796a31aecd573ee485bbb4accd5f28 (diff)
downloadorg-mode-10f1c32f6d40696e91922f3a7f28946fe28e8548.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org.el14
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el
index dd45243..9f48719 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16264,7 +16264,12 @@ When PREFER is `future', return a date that is either CURRENT or future.
When SHOW-ALL is nil, only return the current occurrence of a time stamp."
;; Make the proper lists from the dates
(catch 'exit
- (let ((a1 '(("d" . day) ("w" . week) ("m" . month) ("y" . year)))
+ (let ((a1 '(("h" . hour)
+ ("d" . day)
+ ("w" . week)
+ ("m" . month)
+ ("y" . year)))
+ (shour (nth 2 (org-parse-time-string start)))
dn dw sday cday n1 n2 n0
d m y y1 y2 date1 date2 nmonths nm ny m2)
@@ -16284,6 +16289,13 @@ When SHOW-ALL is nil, only return the current occurrence of a time stamp."
(error "Invalid change specifier: %s" change))
(if (eq dw 'week) (setq dw 'day dn (* 7 dn)))
(cond
+ ((eq dw 'hour)
+ (let ((missing-hours
+ (mod (+ (- (* 24 (- cday sday)) shour) org-extend-today-until)
+ dn)))
+ (setq n1 (if (zerop missing-hours) cday
+ (- cday (1+ (floor (/ missing-hours 24)))))
+ n2 (+ cday (floor (/ (- dn missing-hours) 24))))))
((eq dw 'day)
(setq n1 (+ sday (* dn (floor (/ (- cday sday) dn))))
n2 (+ n1 dn)))