org-e-icalendar: Create vevents for timestamps within headline's title

* contrib/lisp/org-e-icalendar.el (org-e-icalendar-entry): Create
  vevent for timestamps within headline's title.
This commit is contained in:
Nicolas Goaziou 2012-11-25 01:10:11 +01:00
parent a51b8fa308
commit 0226b01c3c
1 changed files with 12 additions and 7 deletions

View File

@ -569,14 +569,16 @@ inlinetask within the section."
(org-e-icalendar--vevent
entry scheduled (concat "SC-" uid)
(concat "S: " summary) loc desc cat)))
;; When collecting plain timestamps from an headline, skip
;; inlinetasks since collection will happen once ENTRY is
;; one of them.
;; When collecting plain timestamps from an headline and
;; its title, skip inlinetasks since collection will
;; happen once ENTRY is one of them.
(let ((counter 0))
(mapconcat
'identity
(org-element-map
inside 'timestamp
(cons (org-element-property :title entry)
(org-element-contents inside))
'timestamp
(lambda (ts)
(let ((uid (format "TS%d-%s" (incf counter) uid)))
(org-e-icalendar--vevent entry ts uid summary loc desc cat)))
@ -595,13 +597,16 @@ inlinetask within the section."
('t (eq todo-type 'todo))))
(org-e-icalendar--vtodo entry uid summary loc desc cat))
;; Diary-sexp: Collect every diary-sexp element within
;; ENTRY and transcode them. If ENTRY is an headline,
;; skip inlinetasks: they will be handled separately.
;; ENTRY and its title, and transcode them. If ENTRY is
;; an headline, skip inlinetasks: they will be handled
;; separately.
(when org-e-icalendar-include-sexps
(let ((counter 0))
(mapconcat 'identity
(org-element-map
inside 'diary-sexp
(cons (org-element-property :title entry)
(org-element-contents inside))
'diary-sexp
(lambda (sexp)
(org-e-icalendar-transcode-diary-sexp
(org-element-property :value sexp)