Fix time extraction when inserting diary entries with `i d'

This commit is contained in:
Carsten Dominik 2010-03-18 06:36:49 +01:00
parent 72b33420b8
commit b79e7790f9
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2010-03-18 Carsten Dominik <carsten.dominik@gmail.com>
* org-agenda.el (org-agenda-add-entry-to-org-agenda-diary-file):
Make sure the behavior regarding to extracting time is
consistent.
2010-03-17 Stephen Eglen <stephen@gnu.org>
* org-agenda.el (org-agenda-insert-diary-extract-time): New

View File

@ -7105,12 +7105,13 @@ the resulting entry will not be shown. When TEXT is empty, switch to
(insert (format "%%%%(diary-anniversary %s) %s"
(calendar-date-string d1 nil t) text))))
((eq type 'day)
(let*
(fmt time time2
(org-agenda-time-leading-zero t))
(let ((org-prefix-has-time t)
(org-agenda-time-leading-zero t)
fmt time time2)
(if org-agenda-insert-diary-extract-time
;; Use org-format-agenda-item to parse text for a time-range and
;; remove it.
;; remove it. FIXME: This is a hack, we should refactor
;; that function to make time extraction available separately
(setq fmt (org-format-agenda-item nil text nil nil t)
time (get-text-property 0 'time fmt)
time2 (if (> (length time) 0)