summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-11-25 01:10:11 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2012-11-25 01:16:44 +0100
commit0226b01c3c202bceb5a020d77b8e9bcf99293934 (patch)
tree4aca14f1a24d45976768335670c91d779dab8b58
parenta51b8fa3085596f3cc241ed82bb2da55d86c87e1 (diff)
downloadorg-mode-0226b01c3c202bceb5a020d77b8e9bcf99293934.tar.gz
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.
-rw-r--r--contrib/lisp/org-e-icalendar.el19
1 files changed, 12 insertions, 7 deletions
diff --git a/contrib/lisp/org-e-icalendar.el b/contrib/lisp/org-e-icalendar.el
index 2b38e0b..0f2905a 100644
--- a/contrib/lisp/org-e-icalendar.el
+++ b/contrib/lisp/org-e-icalendar.el
@@ -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)