diff options
author | Neil Jerram <neil@tigera.io> | 2019-05-28 21:01:17 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-06-10 11:20:20 +0200 |
commit | 85711ba3d903fc21357202148a3379b4b27ef92a (patch) | |
tree | e8ad9cea600124f6dda8b20b57b3b317da852bb3 | |
parent | c30fe929cdeb62093c676bfe0cb18af41348acda (diff) | |
download | org-mode-85711ba3d903fc21357202148a3379b4b27ef92a.tar.gz |
Make capture's idea of the current day more intuitive
-rw-r--r-- | lisp/org.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el index 4b3b133..9601ecf 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -18932,7 +18932,9 @@ Returns the number of empty lines passed." This works in the calendar and in the agenda, anywhere else it just returns the current time. If WITH-TIME is non-nil, returns the time of the event at point (in -the agenda) or the current time of the day." +the agenda) or the current time of the day; otherwise returns the +earliest time on the cursor date that Org treats as that date +(bearing in mind `org-extend-today-until')." (let (date day defd tp hod mod) (when with-time (setq tp (get-text-property (point) 'time)) @@ -18945,13 +18947,13 @@ the agenda) or the current time of the day." (cond ((eq major-mode 'calendar-mode) (setq date (calendar-cursor-to-date) - defd (encode-time 0 (or mod 0) (or hod 0) + defd (encode-time 0 (or mod 0) (or hod org-extend-today-until) (nth 1 date) (nth 0 date) (nth 2 date)))) ((eq major-mode 'org-agenda-mode) (setq day (get-text-property (point) 'day)) (when day (setq date (calendar-gregorian-from-absolute day) - defd (encode-time 0 (or mod 0) (or hod 0) + defd (encode-time 0 (or mod 0) (or hod org-extend-today-until) (nth 1 date) (nth 0 date) (nth 2 date)))))) (or defd (current-time)))) |