1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-23 07:18:53 +00:00

ox-icalendar: Use `org-icalendar-with-timestamps'

* lisp/ox-icalendar.el (org-icalendar-entry): Use
  `org-icalendar-with-timestamps'.

We cannot simply rely on ignored timestamps in communication channels,
as regular `org-export-with-timestamps' only applies to isolated
timestamps.

Thanks to Greg Troxel for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/85387
This commit is contained in:
Nicolas Goaziou 2014-04-23 21:31:34 +02:00
parent e1e5c0776a
commit 1819b90931

View File

@ -570,13 +570,19 @@ inlinetask within the section."
;; happen once ENTRY is one of them.
(let ((counter 0))
(mapconcat
'identity
#'identity
(org-element-map (cons (org-element-property :title entry)
(org-element-contents inside))
'timestamp
(lambda (ts)
(let ((uid (format "TS%d-%s" (incf counter) uid)))
(org-icalendar--vevent entry ts uid summary loc desc cat)))
(when (let ((type (org-element-property :type ts)))
(case (plist-get info :with-timestamps)
(active (memq type '(active active-range)))
(inactive (memq type '(inactive inactive-range)))
((t) t)))
(let ((uid (format "TS%d-%s" (incf counter) uid)))
(org-icalendar--vevent
entry ts uid summary loc desc cat))))
info nil (and (eq type 'headline) 'inlinetask))
""))
;; Task: First check if it is appropriate to export it.
@ -589,7 +595,7 @@ inlinetask within the section."
(and (eq type 'headline)
(not (org-icalendar-blocked-headline-p
entry info))))
('t (eq todo-type 'todo))))
((t) (eq todo-type 'todo))))
(org-icalendar--vtodo entry uid summary loc desc cat))
;; Diary-sexp: Collect every diary-sexp element within
;; ENTRY and its title, and transcode them. If ENTRY is
@ -597,7 +603,7 @@ inlinetask within the section."
;; separately.
(when org-icalendar-include-sexps
(let ((counter 0))
(mapconcat 'identity
(mapconcat #'identity
(org-element-map
(cons (org-element-property :title entry)
(org-element-contents inside))
@ -613,7 +619,7 @@ inlinetask within the section."
;; inlinetask within it. In agenda export, this is independent
;; from the mark (or lack thereof) on the entry.
(when (eq type 'headline)
(mapconcat 'identity
(mapconcat #'identity
(org-element-map inside 'inlinetask
(lambda (task) (org-icalendar-entry task nil info))
info) ""))