Fix time extraction when inserting diary entries with `i d'
This commit is contained in:
parent
72b33420b8
commit
b79e7790f9
|
@ -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>
|
2010-03-17 Stephen Eglen <stephen@gnu.org>
|
||||||
|
|
||||||
* org-agenda.el (org-agenda-insert-diary-extract-time): New
|
* org-agenda.el (org-agenda-insert-diary-extract-time): New
|
||||||
|
|
|
@ -7105,12 +7105,13 @@ the resulting entry will not be shown. When TEXT is empty, switch to
|
||||||
(insert (format "%%%%(diary-anniversary %s) %s"
|
(insert (format "%%%%(diary-anniversary %s) %s"
|
||||||
(calendar-date-string d1 nil t) text))))
|
(calendar-date-string d1 nil t) text))))
|
||||||
((eq type 'day)
|
((eq type 'day)
|
||||||
(let*
|
(let ((org-prefix-has-time t)
|
||||||
(fmt time time2
|
(org-agenda-time-leading-zero t)
|
||||||
(org-agenda-time-leading-zero t))
|
fmt time time2)
|
||||||
(if org-agenda-insert-diary-extract-time
|
(if org-agenda-insert-diary-extract-time
|
||||||
;; Use org-format-agenda-item to parse text for a time-range and
|
;; 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)
|
(setq fmt (org-format-agenda-item nil text nil nil t)
|
||||||
time (get-text-property 0 'time fmt)
|
time (get-text-property 0 'time fmt)
|
||||||
time2 (if (> (length time) 0)
|
time2 (if (> (length time) 0)
|
||||||
|
|
Loading…
Reference in New Issue